Struct aptos_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
sourceimpl 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
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more