pub struct OwnerLock {
pub path: PathBuf,
/* private fields */
}Expand description
A process-lifetime exclusive lock on a data directory.
The lock file is created at {data_dir}/.owner.lock with mode 0600.
The lock is held for the lifetime of this struct (RAII).
When dropped, the file handle is closed which automatically releases
the advisory lock.
Fields§
§path: PathBufImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OwnerLock
impl RefUnwindSafe for OwnerLock
impl Send for OwnerLock
impl Sync for OwnerLock
impl Unpin for OwnerLock
impl UnsafeUnpin for OwnerLock
impl UnwindSafe for OwnerLock
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