pub struct CleanDir<T: DirStructureItem>(pub T);Expand description
A newtype that will clean the directory it is written to, before writing the value.
This is useful when we want to write a directory structure, but we want to make sure that the directory is clean before writing it, so that there are no old files / directories left in it.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<'a, T> FromRefForWriter<'a> for CleanDir<T>where
T: DirStructureItem + 'a,
impl<'a, T> FromRefForWriter<'a> for CleanDir<T>where
T: DirStructureItem + 'a,
Source§impl<T> NewtypeToInner for CleanDir<T>where
T: DirStructureItem,
impl<T> NewtypeToInner for CleanDir<T>where
T: DirStructureItem,
Source§impl<T> ReadFrom for CleanDir<T>where
T: DirStructureItem,
impl<T> ReadFrom for CleanDir<T>where
T: DirStructureItem,
Auto Trait Implementations§
impl<T> Freeze for CleanDir<T>where
T: Freeze,
impl<T> RefUnwindSafe for CleanDir<T>where
T: RefUnwindSafe,
impl<T> Send for CleanDir<T>where
T: Send,
impl<T> Sync for CleanDir<T>where
T: Sync,
impl<T> Unpin for CleanDir<T>where
T: Unpin,
impl<T> UnwindSafe for CleanDir<T>where
T: UnwindSafe,
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