Struct diem_temppath::TempPath
source · pub struct TempPath { /* private fields */ }
Expand description
A simple wrapper for creating a temporary directory that is automatically deleted when it’s dropped. Used in lieu of tempfile due to the large number of dependencies.
Implementations§
source§impl TempPath
impl TempPath
sourcepub fn new_with_temp_dir(temp_dir: PathBuf) -> Self
pub fn new_with_temp_dir(temp_dir: PathBuf) -> Self
Create new, uninitialized temporary path in the specified directory.
pub fn create_as_file(&self) -> Result<()>
pub fn create_as_dir(&self) -> Result<()>
Trait Implementations§
source§impl PartialEq for TempPath
impl PartialEq for TempPath
impl StructuralPartialEq for TempPath
Auto Trait Implementations§
impl RefUnwindSafe for TempPath
impl Send for TempPath
impl Sync for TempPath
impl Unpin for TempPath
impl UnwindSafe for TempPath
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more