pub enum ServerChainView {
UpToDate,
Behind {
server_epoch: u64,
missed_commits: Vec<Vec<u8>>,
},
LocalAhead {
server_epoch: u64,
provable_fork: bool,
},
}Expand description
The server’s authoritative commit chain as seen relative to this member — the classification the real delivery service computes by comparing the member’s head against its persisted chain. This is the mock boundary: this module makes no server changes, so the caller supplies the comparison result rather than this module querying a live server.
Variants§
UpToDate
The member’s head equals the server head.
Behind
The server is ahead: missed_commits are the wire bytes of the commits the member is
missing, oldest first, for replay.
Fields
LocalAhead
The member holds a commit whose hash is absent from the server’s chain (it is ahead).
provable_fork is true when the server has advanced past the local commit’s parent with a
different commit (re-submission can never land) — the discriminator between an honestly
lost commit (retry) and a fork (re-bootstrap).
Auto Trait Implementations§
impl Freeze for ServerChainView
impl RefUnwindSafe for ServerChainView
impl Send for ServerChainView
impl Sync for ServerChainView
impl Unpin for ServerChainView
impl UnsafeUnpin for ServerChainView
impl UnwindSafe for ServerChainView
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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