pub struct Directory {
inner: TempDir,
path: PathBuf,
}Expand description
A unique temporary directory removed when dropped.
Fields§
§inner: TempDir§path: PathBufImplementations§
Source§impl Directory
impl Directory
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Create a unique temporary directory.
§Errors
Returns a contextual error when the directory cannot be created.
Sourcepub fn with_prefix(prefix: &str) -> Result<Self>
pub fn with_prefix(prefix: &str) -> Result<Self>
Create a unique temporary directory with a diagnostic prefix.
§Errors
Returns a contextual error when the directory cannot be created.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Directory
impl RefUnwindSafe for Directory
impl Send for Directory
impl Sync for Directory
impl Unpin for Directory
impl UnsafeUnpin for Directory
impl UnwindSafe for Directory
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