pub enum LeaseRejection<K> {
Occupied {
current: K,
},
WrongHolder {
current: K,
},
StaleGeneration {
observed: TimerGeneration,
current: TimerGeneration,
},
Vacant,
GenerationExhausted,
}Expand description
Typed lease-operation rejection.
Variants§
Occupied
Another holder currently owns the lease.
Fields
§
current: KHolder that currently owns the lease.
WrongHolder
Operation named a holder other than the current holder.
Fields
§
current: KHolder that currently owns the lease.
StaleGeneration
Operation names an old or future generation.
Vacant
No holder currently exists.
GenerationExhausted
The finite generation domain has been consumed.
Trait Implementations§
Source§impl<K: Clone> Clone for LeaseRejection<K>
impl<K: Clone> Clone for LeaseRejection<K>
Source§fn clone(&self) -> LeaseRejection<K>
fn clone(&self) -> LeaseRejection<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 LeaseRejection<K>
impl<K: Debug> Debug for LeaseRejection<K>
Source§impl<K> Display for LeaseRejection<K>
impl<K> Display for LeaseRejection<K>
Source§impl<K> Error for LeaseRejection<K>
impl<K> Error for LeaseRejection<K>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<K: PartialEq> PartialEq for LeaseRejection<K>
impl<K: PartialEq> PartialEq for LeaseRejection<K>
impl<K: Eq> Eq for LeaseRejection<K>
impl<K> StructuralPartialEq for LeaseRejection<K>
Auto Trait Implementations§
impl<K> Freeze for LeaseRejection<K>where
K: Freeze,
impl<K> RefUnwindSafe for LeaseRejection<K>where
K: RefUnwindSafe,
impl<K> Send for LeaseRejection<K>where
K: Send,
impl<K> Sync for LeaseRejection<K>where
K: Sync,
impl<K> Unpin for LeaseRejection<K>where
K: Unpin,
impl<K> UnsafeUnpin for LeaseRejection<K>where
K: UnsafeUnpin,
impl<K> UnwindSafe for LeaseRejection<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