pub struct LeaseWindow { /* private fields */ }Expand description
Explicit holder and monotonic bounds for one operation lease acquisition.
Implementations§
Source§impl LeaseWindow
impl LeaseWindow
Sourcepub fn new(
holder: Datum,
acquired_at: u64,
expires_at: u64,
) -> Result<Self, OperationError>
pub fn new( holder: Datum, acquired_at: u64, expires_at: u64, ) -> Result<Self, OperationError>
Validates a non-empty half-open monotonic lease interval.
Sourcepub const fn acquired_at(&self) -> u64
pub const fn acquired_at(&self) -> u64
Returns the inclusive monotonic acquisition tick.
Sourcepub const fn expires_at(&self) -> u64
pub const fn expires_at(&self) -> u64
Returns the exclusive monotonic expiry tick.
Trait Implementations§
Source§impl Clone for LeaseWindow
impl Clone for LeaseWindow
Source§fn clone(&self) -> LeaseWindow
fn clone(&self) -> LeaseWindow
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 moreSource§impl Debug for LeaseWindow
impl Debug for LeaseWindow
impl Eq for LeaseWindow
Source§impl PartialEq for LeaseWindow
impl PartialEq for LeaseWindow
impl StructuralPartialEq for LeaseWindow
Auto Trait Implementations§
impl Freeze for LeaseWindow
impl RefUnwindSafe for LeaseWindow
impl Send for LeaseWindow
impl Sync for LeaseWindow
impl Unpin for LeaseWindow
impl UnsafeUnpin for LeaseWindow
impl UnwindSafe for LeaseWindow
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