Struct LeaseObservation
pub struct LeaseObservation { /* private fields */ }Expand description
A read-only complete lease observation used for conditional failover.
The heartbeat sequence is intentionally separate from the timestamp. Two observations with the same timestamp are still distinguishable when one heartbeat was renewed in between them.
Implementations§
§impl LeaseObservation
impl LeaseObservation
pub const fn state(self) -> TrialState
pub const fn state(self) -> TrialState
The observed trial state.
pub const fn heartbeat_millis(self) -> Option<u64>
pub const fn heartbeat_millis(self) -> Option<u64>
The last supplied heartbeat timestamp.
pub const fn heartbeat_seq(self) -> u64
pub const fn heartbeat_seq(self) -> u64
The monotonically increasing heartbeat observation sequence.
Trait Implementations§
§impl Clone for LeaseObservation
impl Clone for LeaseObservation
§fn clone(&self) -> LeaseObservation
fn clone(&self) -> LeaseObservation
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 moreimpl Copy for LeaseObservation
§impl Debug for LeaseObservation
impl Debug for LeaseObservation
impl Eq for LeaseObservation
§impl Hash for LeaseObservation
impl Hash for LeaseObservation
§impl PartialEq for LeaseObservation
impl PartialEq for LeaseObservation
impl StructuralPartialEq for LeaseObservation
Auto Trait Implementations§
impl Freeze for LeaseObservation
impl RefUnwindSafe for LeaseObservation
impl Send for LeaseObservation
impl Sync for LeaseObservation
impl Unpin for LeaseObservation
impl UnsafeUnpin for LeaseObservation
impl UnwindSafe for LeaseObservation
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