pub struct LeaseLock { /* private fields */ }Expand description
Filesystem lease lock. One lease file per key under root.
Implementations§
Trait Implementations§
Source§impl CoordinationLock for LeaseLock
impl CoordinationLock for LeaseLock
Source§fn acquire<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
lease: Duration,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn LockGuard>, LockError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn acquire<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
lease: Duration,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn LockGuard>, LockError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Acquire (or queue for) the lock named
key, waiting up to lease
for ownership. The returned guard frees the lock on release/drop.Auto Trait Implementations§
impl Freeze for LeaseLock
impl RefUnwindSafe for LeaseLock
impl Send for LeaseLock
impl Sync for LeaseLock
impl Unpin for LeaseLock
impl UnsafeUnpin for LeaseLock
impl UnwindSafe for LeaseLock
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