pub struct TempPathGuard { /* private fields */ }Expand description
RAII guard that unlinks a temp path unless disarm is
called. Used to prevent orphan .tmp files when an intermediate step
between File::create and rename fails.
Public so callers with their own atomic-rename recipes (harness
install_seed_exclusive, per-crate tmp files) can reuse the same
unlink-on-drop discipline as write_atomic.
Implementations§
Trait Implementations§
Source§impl Drop for TempPathGuard
impl Drop for TempPathGuard
Auto Trait Implementations§
impl Freeze for TempPathGuard
impl RefUnwindSafe for TempPathGuard
impl Send for TempPathGuard
impl Sync for TempPathGuard
impl Unpin for TempPathGuard
impl UnsafeUnpin for TempPathGuard
impl UnwindSafe for TempPathGuard
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