pub enum LeaseState<K, Route> {
Vacant {
next: TimerGeneration,
},
Held {
holder: K,
generation: TimerGeneration,
notify: Route,
next: Option<TimerGeneration>,
},
Exhausted,
}Expand description
Complete exclusive lease phase.
Variants§
Vacant
No holder owns the lease.
Fields
§
next: TimerGenerationGeneration committed by the next successful acquisition.
Held
One holder owns exactly this timer generation.
Fields
§
holder: KApplication-defined holder identity.
§
generation: TimerGenerationCurrent expiry generation.
§
notify: RouteRecipient notified of expiry.
§
next: Option<TimerGeneration>Generation available to a renewal or later acquisition. None
means this held generation is the final representable one.
Exhausted
No fresh expiry generation is representable and no holder exists.
Auto Trait Implementations§
impl<K, Route> Freeze for LeaseState<K, Route>
impl<K, Route> RefUnwindSafe for LeaseState<K, Route>where
K: RefUnwindSafe,
Route: RefUnwindSafe,
impl<K, Route> Send for LeaseState<K, Route>
impl<K, Route> Sync for LeaseState<K, Route>
impl<K, Route> Unpin for LeaseState<K, Route>
impl<K, Route> UnsafeUnpin for LeaseState<K, Route>where
K: UnsafeUnpin,
Route: UnsafeUnpin,
impl<K, Route> UnwindSafe for LeaseState<K, Route>where
K: UnwindSafe,
Route: 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