Enum unc_primitives::errors::EpochError
source · pub enum EpochError {
ThresholdError {
pledge_sum: Balance,
num_seats: u64,
},
EpochOutOfBounds(EpochId),
MissingBlock(CryptoHash),
IOErr(String),
NotAValidator(AccountId, EpochId),
ShardingError(String),
NotEnoughValidators {
num_validators: u64,
num_shards: u64,
},
ChunkValidatorSelectionError(String),
}Variants§
ThresholdError
Error calculating threshold from given pledges for given number of seats. Only should happened if calling code doesn’t check for integer value of pledge > number of seats.
EpochOutOfBounds(EpochId)
Requesting validators for an epoch that wasn’t computed yet.
MissingBlock(CryptoHash)
Missing block hash in the storage (means there is some structural issue).
IOErr(String)
Error due to IO (DB read/write, serialization, etc.).
NotAValidator(AccountId, EpochId)
Given account ID is not a validator in the given epoch ID.
ShardingError(String)
Error getting information for a shard
NotEnoughValidators
ChunkValidatorSelectionError(String)
Error selecting validators for a chunk.
Trait Implementations§
source§impl Clone for EpochError
impl Clone for EpochError
source§fn clone(&self) -> EpochError
fn clone(&self) -> EpochError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for EpochError
impl Debug for EpochError
source§impl Display for EpochError
impl Display for EpochError
source§impl Error for EpochError
impl Error for EpochError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<BlockError> for EpochError
impl From<BlockError> for EpochError
source§fn from(error: BlockError) -> Self
fn from(error: BlockError) -> Self
Converts to this type from the input type.
source§impl From<EpochError> for BlockError
impl From<EpochError> for BlockError
source§fn from(error: EpochError) -> Self
fn from(error: EpochError) -> Self
Converts to this type from the input type.
source§impl From<EpochError> for RuntimeError
impl From<EpochError> for RuntimeError
source§fn from(e: EpochError) -> Self
fn from(e: EpochError) -> Self
Converts to this type from the input type.
source§impl From<Error> for EpochError
impl From<Error> for EpochError
source§impl PartialEq for EpochError
impl PartialEq for EpochError
source§fn eq(&self, other: &EpochError) -> bool
fn eq(&self, other: &EpochError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for EpochError
impl StructuralPartialEq for EpochError
Auto Trait Implementations§
impl Freeze for EpochError
impl RefUnwindSafe for EpochError
impl Send for EpochError
impl Sync for EpochError
impl Unpin for EpochError
impl UnwindSafe for EpochError
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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§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<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.