pub enum LeaseOutcome<K> {
Acquired {
holder: K,
generation: TimerGeneration,
},
Renewed {
holder: K,
generation: TimerGeneration,
},
Released {
holder: K,
generation: TimerGeneration,
},
Expired {
holder: K,
generation: TimerGeneration,
},
Rejected {
request: LeaseRequest<K>,
reason: LeaseRejection<K>,
},
}Expand description
Factual lease operation result.
Variants§
Acquired
Fresh ownership was committed and expiry requested.
Renewed
Existing ownership was renewed into a fresh generation.
Released
Ownership was explicitly relinquished.
Expired
Matching timer evidence expired ownership.
Rejected
Operation was rejected without changing state.
Fields
§
request: LeaseRequest<K>Complete operation that was not admitted.
§
reason: LeaseRejection<K>Exhaustive reason derived from current lease state.
Trait Implementations§
Source§impl<K: Clone> Clone for LeaseOutcome<K>
impl<K: Clone> Clone for LeaseOutcome<K>
Source§fn clone(&self) -> LeaseOutcome<K>
fn clone(&self) -> LeaseOutcome<K>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K: Debug> Debug for LeaseOutcome<K>
impl<K: Debug> Debug for LeaseOutcome<K>
Source§impl<K: PartialEq> PartialEq for LeaseOutcome<K>
impl<K: PartialEq> PartialEq for LeaseOutcome<K>
impl<K: Eq> Eq for LeaseOutcome<K>
impl<K> StructuralPartialEq for LeaseOutcome<K>
Auto Trait Implementations§
impl<K> Freeze for LeaseOutcome<K>where
K: Freeze,
impl<K> RefUnwindSafe for LeaseOutcome<K>where
K: RefUnwindSafe,
impl<K> Send for LeaseOutcome<K>where
K: Send,
impl<K> Sync for LeaseOutcome<K>where
K: Sync,
impl<K> Unpin for LeaseOutcome<K>where
K: Unpin,
impl<K> UnsafeUnpin for LeaseOutcome<K>where
K: UnsafeUnpin,
impl<K> UnwindSafe for LeaseOutcome<K>where
K: UnwindSafe,
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