pub enum EpochState {
Preparing,
Active,
Ending,
Ended,
}Expand description
State of an epoch.
Variants§
Preparing
Epoch is being prepared (not yet active).
Active
Epoch is currently active.
Ending
Epoch is ending (grace period).
Ended
Epoch has ended.
Implementations§
Source§impl EpochState
impl EpochState
Sourcepub const fn is_active(self) -> bool
pub const fn is_active(self) -> bool
Returns true if the epoch is currently accepting operations.
Sourcepub const fn is_terminal(self) -> bool
pub const fn is_terminal(self) -> bool
Returns true if the epoch has terminated.
Sourcepub const fn allows_completion(self) -> bool
pub const fn allows_completion(self) -> bool
Returns true if operations can still complete (active or ending).
Trait Implementations§
Source§impl Clone for EpochState
impl Clone for EpochState
Source§fn clone(&self) -> EpochState
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EpochState
Source§impl Debug for EpochState
impl Debug for EpochState
impl Eq for EpochState
Source§impl PartialEq for EpochState
impl PartialEq for EpochState
impl StructuralPartialEq for EpochState
Auto Trait Implementations§
impl Freeze for EpochState
impl RefUnwindSafe for EpochState
impl Send for EpochState
impl Sync for EpochState
impl Unpin for EpochState
impl UnsafeUnpin for EpochState
impl UnwindSafe for EpochState
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<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§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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).