pub enum Handoff<D> {
Vote(D),
Stage(D),
Wait,
}Expand description
An application’s response to a handoff proposal request.
Handoff<()> is the same decision without a payload, and map attaches one.
Variants§
Vote(D)
Relay the candidate and cast the proposer’s notarize vote without waiting for the parent to certify.
This trusts the outgoing leader not to equivocate and to complete its term, since the proposal is usable only if every uncertified view it builds on certifies.
Validators buffer the early vote only once it is inside their admission window, which always includes the next term start from the parent’s term (see Optimistic Validation), and consensus does not resend it. If the quorum needs a validator whose window does not reach the vote yet, the incoming term times out.
Stage(D)
Relay the candidate and withhold the proposer’s notarize vote until its parent certifies or finalizes.
The relay commits to nothing: only the vote names a proposal. If the parent is replaced before it certifies, the proposer can relay another candidate for the same view.
A relay may defer sending the candidate until consensus requests the broadcast that precedes the proposer’s vote.
Wait
Request an ordinary proposal after the parent certifies.
Implementations§
Trait Implementations§
impl<D: Copy> Copy for Handoff<D>
impl<D: Eq> Eq for Handoff<D>
impl<D: PartialEq> StructuralPartialEq for Handoff<D>
Auto Trait Implementations§
impl<D> Freeze for Handoff<D>where
D: Freeze,
impl<D> RefUnwindSafe for Handoff<D>where
D: RefUnwindSafe,
impl<D> Send for Handoff<D>where
D: Send,
impl<D> Sync for Handoff<D>where
D: Sync,
impl<D> Unpin for Handoff<D>where
D: Unpin,
impl<D> UnsafeUnpin for Handoff<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for Handoff<D>where
D: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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