pub struct SharedResourceLease {
pub token: LeaseToken,
pub acquired_at_ms: u64,
pub heartbeat_at_ms: u64,
pub expires_at_ms: u64,
}Expand description
Durable shared-resource lease state.
Fields§
§token: LeaseTokenCurrent fencing token.
acquired_at_ms: u64Acquisition timestamp in milliseconds.
heartbeat_at_ms: u64Last heartbeat timestamp in milliseconds.
expires_at_ms: u64Expiration timestamp in milliseconds.
Implementations§
Sourcepub fn is_expired(&self, now_ms: u64, policy: &LeasePolicy) -> bool
pub fn is_expired(&self, now_ms: u64, policy: &LeasePolicy) -> bool
Reports whether this lease is expired at now_ms under policy.
Trait Implementations§
Source§fn clone(&self) -> SharedResourceLease
fn clone(&self) -> SharedResourceLease
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
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