pub struct VerifiedLease {
pub lease: CloudLeaseV1,
pub envelope: CloudLeaseEnvelopeV1,
pub offset_seconds: i64,
}Expand description
A lease that passed verification, with the service clock offset.
Fields§
§lease: CloudLeaseV1§envelope: CloudLeaseEnvelopeV1§offset_seconds: i64server_time - local time when the lease arrived, in seconds.
Implementations§
Source§impl VerifiedLease
impl VerifiedLease
Sourcepub fn service_time(&self, local: UtcDateTime) -> OffsetDateTime
pub fn service_time(&self, local: UtcDateTime) -> OffsetDateTime
Service time for a local instant.
pub fn state_at(&self, local: UtcDateTime) -> LeaseState
pub fn renew_due(&self, local: UtcDateTime) -> bool
Trait Implementations§
Source§impl Clone for VerifiedLease
impl Clone for VerifiedLease
Source§impl Debug for VerifiedLease
impl Debug for VerifiedLease
Source§impl PartialEq for VerifiedLease
impl PartialEq for VerifiedLease
impl StructuralPartialEq for VerifiedLease
Auto Trait Implementations§
impl Forget for VerifiedLease
impl Freeze for VerifiedLeasewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<CloudRight>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for VerifiedLease
impl RefUnwindSafe for VerifiedLease
impl Send for VerifiedLease
impl Sync for VerifiedLease
impl Unpin for VerifiedLease
impl UnsafeUnpin for VerifiedLeasewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<CloudRight>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for VerifiedLease
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more