pub struct FileGuard { /* private fields */ }
Expand description
A lock using the atomicity of OpenOptions::create_new
.
Be careful! You can easily delete it; just open your file explorer throw it into the trash. It is not the most guaranteed for of atomicity, but it is one standard way of providing a persistent locking mechanism between processes.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for FileGuard
impl Send for FileGuard
impl Sync for FileGuard
impl Unpin for FileGuard
impl UnwindSafe for FileGuard
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