pub struct WatchLease { /* private fields */ }Expand description
The watch lease (watch.lock): held by a live watcher for its lifetime.
Implementations§
Source§impl WatchLease
impl WatchLease
Sourcepub fn try_acquire(omgbase_dir: &Path) -> Result<Option<Self>>
pub fn try_acquire(omgbase_dir: &Path) -> Result<Option<Self>>
Take the lease; None when a live watcher holds it (a dead holder’s
lease is stolen).
Sourcepub fn live(omgbase_dir: &Path) -> bool
pub fn live(omgbase_dir: &Path) -> bool
Whether a live watcher holds the lease (the one-shot commands’ probe).
pub fn path(&self) -> &Path
pub fn release(&mut self)
Trait Implementations§
Source§impl Debug for WatchLease
impl Debug for WatchLease
Source§impl Drop for WatchLease
impl Drop for WatchLease
Auto Trait Implementations§
impl Freeze for WatchLease
impl RefUnwindSafe for WatchLease
impl Send for WatchLease
impl Sync for WatchLease
impl Unpin for WatchLease
impl UnsafeUnpin for WatchLease
impl UnwindSafe for WatchLease
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