pub struct Lease {
pub agent_id: String,
pub holder: String,
pub epoch: u64,
pub expires_at_ms: u64,
}Expand description
A granted lease — the proposal’s Lease { agent_id, holder, epoch, expires_at }. epoch is the fencing token: strictly monotone per
agent, never reused, minted on every successful LeaseCoordinator::acquire.
Fields§
§agent_id: String§holder: StringThe device that holds it.
epoch: u64Monotone fencing token (never reused). Threaded into every leased
Intent this holder writes; the fold fences anything below the
agent’s max.
expires_at_ms: u64Server-authoritative expiry (coordinator wall-clock ms). Dodges
client skew — the proposal’s requirement. Expiry only enables
stealing; the holder can LeaseCoordinator::renew until stolen.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lease
impl<'de> Deserialize<'de> for Lease
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
impl Eq for Lease
impl StructuralPartialEq for Lease
Auto Trait Implementations§
impl Freeze for Lease
impl RefUnwindSafe for Lease
impl Send for Lease
impl Sync for Lease
impl Unpin for Lease
impl UnsafeUnpin for Lease
impl UnwindSafe for Lease
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