Enum sc_consensus_epochs::ViableEpoch [−][src]
pub enum ViableEpoch<E, ERef = E> { UnimportedGenesis(E), Signaled(ERef), }
The viable epoch under which a block can be verified.
If this is the first non-genesis block in the chain, then it will
hold an UnimportedGenesis
epoch.
Variants
Unimported genesis viable epoch data.
Regular viable epoch data.
Implementations
impl<E, ERef> ViableEpoch<E, ERef> where
E: Epoch + Clone,
ERef: Borrow<E>,
[src]
impl<E, ERef> ViableEpoch<E, ERef> where
E: Epoch + Clone,
ERef: Borrow<E>,
[src]pub fn into_cloned_inner(self) -> E
[src]
Extract the underlying epoch, disregarding the fact that a genesis epoch may be unimported.
pub fn into_cloned(self) -> ViableEpoch<E, E>
[src]
Get cloned value for the viable epoch.
pub fn increment(
&self,
next_descriptor: E::NextEpochDescriptor
) -> IncrementedEpoch<E>
[src]
&self,
next_descriptor: E::NextEpochDescriptor
) -> IncrementedEpoch<E>
Increment the epoch, yielding an IncrementedEpoch
to be imported
into the fork-tree.
Trait Implementations
impl<E, ERef> AsMut<E> for ViableEpoch<E, ERef> where
ERef: BorrowMut<E>,
[src]
impl<E, ERef> AsMut<E> for ViableEpoch<E, ERef> where
ERef: BorrowMut<E>,
[src]Auto Trait Implementations
impl<E, ERef> RefUnwindSafe for ViableEpoch<E, ERef> where
E: RefUnwindSafe,
ERef: RefUnwindSafe,
E: RefUnwindSafe,
ERef: RefUnwindSafe,
impl<E, ERef> Send for ViableEpoch<E, ERef> where
E: Send,
ERef: Send,
E: Send,
ERef: Send,
impl<E, ERef> Sync for ViableEpoch<E, ERef> where
E: Sync,
ERef: Sync,
E: Sync,
ERef: Sync,
impl<E, ERef> Unpin for ViableEpoch<E, ERef> where
E: Unpin,
ERef: Unpin,
E: Unpin,
ERef: Unpin,
impl<E, ERef> UnwindSafe for ViableEpoch<E, ERef> where
E: UnwindSafe,
ERef: UnwindSafe,
E: UnwindSafe,
ERef: UnwindSafe,
Blanket Implementations
impl<T, U> AsByteSlice<T> for U where
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
[src]
impl<T, U> AsByteSlice<T> for U where
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
[src]pub fn as_byte_slice(&self) -> &[u8]
[src]
impl<T, U> AsMutByteSlice<T> for U where
T: ToMutByteSlice,
U: AsMut<[T]> + ?Sized,
[src]
impl<T, U> AsMutByteSlice<T> for U where
T: ToMutByteSlice,
U: AsMut<[T]> + ?Sized,
[src]pub fn as_mut_byte_slice(&mut self) -> &mut [u8]
[src]
impl<U> AsMutSliceOf for U where
U: AsMut<[u8]> + ?Sized,
[src]
impl<U> AsMutSliceOf for U where
U: AsMut<[u8]> + ?Sized,
[src]pub fn as_mut_slice_of<T>(&mut self) -> Result<&mut [T], Error> where
T: FromByteSlice,
[src]
T: FromByteSlice,
impl<U> AsSliceOf for U where
U: AsRef<[u8]> + ?Sized,
[src]
impl<U> AsSliceOf for U where
U: AsRef<[u8]> + ?Sized,
[src]pub fn as_slice_of<T>(&self) -> Result<&[T], Error> where
T: FromByteSlice,
[src]
T: FromByteSlice,
impl<T> CheckedConversion for T
[src]
impl<T> CheckedConversion for T
[src]pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]impl<Ctx, T> MeasureWith<Ctx> for T where
T: AsRef<[u8]>,
[src]
impl<Ctx, T> MeasureWith<Ctx> for T where
T: AsRef<[u8]>,
[src]pub fn measure_with(&self, _ctx: &Ctx) -> usize
[src]
impl<T> SaturatedConversion for T
[src]
impl<T> SaturatedConversion for T
[src]pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
[src]
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
[src]
Self: UniqueSaturatedInto<T>,
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]pub fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,
pub fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]pub fn unchecked_into(self) -> T
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
[src]pub fn unique_saturated_into(self) -> T
[src]
impl<T> WithSubscriber for T
[src]
impl<T> WithSubscriber for T
[src]pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,
pub fn with_current_subscriber(self) -> WithDispatch<Self>
[src]
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,