pub struct LockManager { /* private fields */ }Implementations§
Source§impl LockManager
impl LockManager
pub fn new(path: PathBuf) -> Self
Sourcepub fn with_metadata(self, key: &str, value: Value) -> Self
pub fn with_metadata(self, key: &str, value: Value) -> Self
Publish key in the lock file while it is held.
Sourcepub fn read_lock_file(&self) -> Option<Value>
pub fn read_lock_file(&self) -> Option<Value>
The published lock file, if one is readable.
pub fn for_cpu_monitor(self) -> Self
pub fn acquire(&mut self, timeout: u64) -> bool
pub fn release(&mut self)
Trait Implementations§
Source§impl Drop for LockManager
impl Drop for LockManager
Auto Trait Implementations§
impl Freeze for LockManager
impl RefUnwindSafe for LockManager
impl Send for LockManager
impl Sync for LockManager
impl Unpin for LockManager
impl UnsafeUnpin for LockManager
impl UnwindSafe for LockManager
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