pub enum LeaseMessage<K, Route> {
Acquire {
holder: K,
duration: Duration,
reply_to: Route,
},
Renew {
holder: K,
generation: TimerGeneration,
duration: Duration,
reply_to: Route,
},
Release {
holder: K,
generation: TimerGeneration,
reply_to: Route,
},
}Expand description
User commands accepted by Lease.
Variants§
Acquire
Acquire a vacant lease for a relative duration.
Renew
Renew the exact current incarnation.
Fields
§
holder: KClaimed holder.
§
generation: TimerGenerationClaimed current generation.
§
reply_to: RouteOutcome and expiry recipient.
Release
Explicitly release the exact current incarnation.
Fields
§
holder: KClaimed holder.
§
generation: TimerGenerationClaimed current generation.
§
reply_to: RouteOutcome recipient.
Auto Trait Implementations§
impl<K, Route> Freeze for LeaseMessage<K, Route>
impl<K, Route> RefUnwindSafe for LeaseMessage<K, Route>where
K: RefUnwindSafe,
Route: RefUnwindSafe,
impl<K, Route> Send for LeaseMessage<K, Route>
impl<K, Route> Sync for LeaseMessage<K, Route>
impl<K, Route> Unpin for LeaseMessage<K, Route>
impl<K, Route> UnsafeUnpin for LeaseMessage<K, Route>where
K: UnsafeUnpin,
Route: UnsafeUnpin,
impl<K, Route> UnwindSafe for LeaseMessage<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