pub enum ProposedBatchState<N: Network> {
None,
Certifying(Box<Proposal<N>>),
Certified(Field<N>),
}Expand description
The state of the primary’s batch proposal.
Variants§
None
No batch is currently being proposed.
Certifying(Box<Proposal<N>>)
A batch is being proposed and awaiting signatures.
Certified(Field<N>)
A batch has reached quorum and is being inserted into storage. Carries the batch ID so late-arriving signatures can be recognized and silently dropped.
Implementations§
Source§impl<N: Network> ProposedBatchState<N>
impl<N: Network> ProposedBatchState<N>
Sourcepub fn is_proposed(&self) -> bool
pub fn is_proposed(&self) -> bool
Returns true if a batch is currently being proposed (awaiting signatures).
Sourcepub fn as_proposal(&self) -> Option<&Proposal<N>>
pub fn as_proposal(&self) -> Option<&Proposal<N>>
Returns a reference to the in-progress proposal, or None if not in the Certifying state.
Trait Implementations§
Source§impl<N: Network> Default for ProposedBatchState<N>
impl<N: Network> Default for ProposedBatchState<N>
impl<N: Eq + Network> Eq for ProposedBatchState<N>
impl<N: PartialEq + Network> StructuralPartialEq for ProposedBatchState<N>
Auto Trait Implementations§
impl<N> Freeze for ProposedBatchState<N>
impl<N> RefUnwindSafe for ProposedBatchState<N>
impl<N> Send for ProposedBatchState<N>
impl<N> Sync for ProposedBatchState<N>
impl<N> Unpin for ProposedBatchState<N>
impl<N> UnsafeUnpin for ProposedBatchState<N>
impl<N> UnwindSafe for ProposedBatchState<N>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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