Enum ckb_verification::EpochError
source · pub enum EpochError {
Malformed {
value: EpochNumberWithFraction,
},
NonContinuous {
current: EpochNumberWithFraction,
parent: EpochNumberWithFraction,
},
TargetMismatch {
expected: u32,
actual: u32,
},
NumberMismatch {
expected: u64,
actual: u64,
},
}Expand description
Errors due to the fact that the block epoch is not expected.
Variants§
Malformed
Fields
§
value: EpochNumberWithFractionThe malformed header epoch.
The format of header epoch is malformed.
NonContinuous
Fields
§
current: EpochNumberWithFractionThe current header epoch.
§
parent: EpochNumberWithFractionThe parent header epoch.
The header epoch is not continuous.
TargetMismatch
Fields
The compact-target of block epoch is unexpected.
NumberMismatch
Fields
The number of block epoch is unexpected.
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<EpochError> for Error
impl From<EpochError> for Error
source§fn from(error: EpochError) -> Self
fn from(error: EpochError) -> Self
Converts to this type from the input type.
source§impl From<EpochError> for HeaderError
impl From<EpochError> for HeaderError
source§fn from(error: EpochError) -> Self
fn from(error: EpochError) -> Self
Converts to this type from the input type.
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 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§
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