#[non_exhaustive]pub struct Snapshot {
pub own: u64,
pub selected: u64,
pub active: usize,
pub legacy: usize,
pub retired: bool,
pub superseded_for: Option<Duration>,
}Expand description
Local session state. Counts describe leases, not application operations.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.own: u64This process’s epoch.
selected: u64Monotonic selected epoch.
active: usizeAdmitted sessions still held.
legacy: usizeAdmitted sessions using a legacy protocol.
retired: boolAdmission closed permanently after retirement.
superseded_for: Option<Duration>How long a newer generation has been selected, if one has.
Trait Implementations§
impl Copy for Snapshot
impl Eq for Snapshot
impl StructuralPartialEq for Snapshot
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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