pub struct RepoLock { /* private fields */ }Expand description
A guard that holds the repository lock until dropped.
Implementations§
Source§impl RepoLock
impl RepoLock
Sourcepub fn acquire(void_dir: &Path, force: bool) -> Result<Self>
pub fn acquire(void_dir: &Path, force: bool) -> Result<Self>
Acquire the repository lock, optionally forcing removal of a stale lock.
Sourcepub fn is_stale(void_dir: &Path) -> Result<Option<StaleLockInfo>>
pub fn is_stale(void_dir: &Path) -> Result<Option<StaleLockInfo>>
Check if an existing lock is stale (process no longer running).
Sourcepub fn acquire_auto(void_dir: &Path) -> Result<Self>
pub fn acquire_auto(void_dir: &Path) -> Result<Self>
Acquire lock, automatically removing stale locks.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RepoLock
impl RefUnwindSafe for RepoLock
impl Send for RepoLock
impl Sync for RepoLock
impl Unpin for RepoLock
impl UnsafeUnpin for RepoLock
impl UnwindSafe for RepoLock
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more