Enum near_primitives::errors::EpochError
source · [−]pub enum EpochError {
ThresholdError {
stake_sum: Balance,
num_seats: u64,
},
EpochOutOfBounds(EpochId),
MissingBlock(CryptoHash),
IOErr(String),
NotAValidator(AccountId, EpochId),
ShardingError(String),
NotEnoughValidators {
num_validators: u64,
num_shards: u64,
},
}Variants
ThresholdError
Error calculating threshold from given stakes for given number of seats. Only should happened if calling code doesn’t check for integer value of stake > 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
Trait Implementations
sourceimpl Clone for EpochError
impl Clone for EpochError
sourcefn clone(&self) -> EpochError
fn clone(&self) -> EpochError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for EpochError
impl Debug for EpochError
sourceimpl Display for EpochError
impl Display for EpochError
sourceimpl Error for EpochError
impl Error for EpochError
1.30.0 · sourcefn 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 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<EpochError> for RuntimeError
impl From<EpochError> for RuntimeError
sourcefn from(e: EpochError) -> Self
fn from(e: EpochError) -> Self
Converts to this type from the input type.
sourceimpl From<Error> for EpochError
impl From<Error> for EpochError
sourceimpl PartialEq<EpochError> for EpochError
impl PartialEq<EpochError> for EpochError
sourcefn eq(&self, other: &EpochError) -> bool
fn eq(&self, other: &EpochError) -> bool
impl Eq for EpochError
impl StructuralEq for EpochError
impl StructuralPartialEq for EpochError
Auto Trait Implementations
impl RefUnwindSafe for EpochError
impl Send for EpochError
impl Sync for EpochError
impl Unpin for EpochError
impl UnwindSafe for EpochError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more