Skip to main content

EpochState

Struct EpochState 

Source
pub struct EpochState {
    pub holder_id: String,
    pub epoch: u64,
    pub token: String,
    pub last_renew_unix: Option<u64>,
    pub echo: Option<String>,
    pub released: bool,
    pub waiters: Vec<String>,
    pub handoff: Option<String>,
}
Expand description

Observed epoch state (read side — takeover judgment input).

Fields§

§holder_id: String§epoch: u64§token: String

Backend token guarding the next transition (S3: the epoch object’s ETag; Azure: the lease id).

§last_renew_unix: Option<u64>

The store’s own clock for the last renewal (S3 Last-Modified) — A8: takeover is judged against the STORE’s clock, not ours.

§echo: Option<String>

An opaque observed-state echo the holder wrote with its last heartbeat, if any (LeaseEcho). Read-only to everyone but the holder: it is the ONE fleet-visible surface that reports what a syncer is actually doing rather than what its spec asked for, and it costs nothing — the heartbeat CAS was already happening. None = the holder wrote none (an older binary, a clean release, or a backend that cannot carry it).

§released: bool

The holder shut down cleanly and will never publish under this epoch again — a successor supersedes immediately instead of waiting out the lease. Written by ObjectStore::epoch_release.

§waiters: Vec<String>

The FIFO of holders waiting for the cell (lean’s per-barrier lease, design 2026-09-13 §4.2). A claimant that finds the cell held, or released-and-handed to someone else, appends itself ONCE (ObjectStore::epoch_enqueue); the holder’s handoff pops the head into handoff. Empty on every cell written by a holder that never queues (the tier hub), which degrades to today’s behaviour and never to a second holder.

§handoff: Option<String>

Who a RELEASED cell is reserved for: the queue head at the time of the handoff. Only that holder may acquire it — or anyone, once it has been quiet long enough to be judged dead. None = first come, first served.

Trait Implementations§

Source§

impl Clone for EpochState

Source§

fn clone(&self) -> EpochState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EpochState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for EpochState

Source§

impl PartialEq for EpochState

Source§

fn eq(&self, other: &EpochState) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EpochState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.