pub enum LeaseWire {
Granted(Lease),
Held {
holder: String,
epoch: u64,
expires_at_ms: u64,
},
Lost {
claimed_epoch: u64,
current_epoch: u64,
},
Released,
Current(Option<Lease>),
}Expand description
The serialized verdict of a lease-register call. Mirrors the coordinator’s
Result<_, LeaseError> in a wire-portable shape; the client reconstructs the
real LeaseError from it (the agent_id is known client-side).
Variants§
Granted(Lease)
acquire/renew granted this lease.
Held
acquire CAS-failed: a still-valid lease is held.
Lost
renew/release found the caller is no longer the holder at its epoch.
Released
release succeeded.
Current(Option<Lease>)
current read (holder or unheld).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LeaseWire
impl<'de> Deserialize<'de> for LeaseWire
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LeaseWire
impl RefUnwindSafe for LeaseWire
impl Send for LeaseWire
impl Sync for LeaseWire
impl Unpin for LeaseWire
impl UnsafeUnpin for LeaseWire
impl UnwindSafe for LeaseWire
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