pub struct StoreLock { /* private fields */ }Expand description
Exclusive writer ownership automatically released when the process dies.
Implementations§
Source§impl StoreLock
impl StoreLock
Sourcepub fn acquire(directory: &Path) -> Result<Self, StoreLockError>
pub fn acquire(directory: &Path) -> Result<Self, StoreLockError>
Attempts to acquire exclusive non-blocking ownership for one store.
Registry admission happens first so a second same-process writer is rejected before any lock file is touched. Every failure after that point unregisters exactly once, so a failed admission never leaves the store permanently unopenable.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StoreLock
impl RefUnwindSafe for StoreLock
impl Send for StoreLock
impl Sync for StoreLock
impl Unpin for StoreLock
impl UnsafeUnpin for StoreLock
impl UnwindSafe for StoreLock
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