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
expected: u32The expected compact-target of block epoch.
actual: u32The actual compact-target of block epoch.
The compact-target of block epoch is unexpected.
NumberMismatch
The number of block epoch is unexpected.
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 more
sourceimpl 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
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<EpochError> for HeaderError
impl From<EpochError> for HeaderError
sourcefn from(error: EpochError) -> Self
fn from(error: EpochError) -> Self
Converts to this type from the input type.
sourceimpl From<EpochError> for Error
impl From<EpochError> for Error
sourcefn from(error: EpochError) -> Self
fn from(error: EpochError) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<EpochError> for EpochError
impl PartialEq<EpochError> for EpochError
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &EpochError) -> bool
fn ne(&self, other: &EpochError) -> bool
This method tests for !=.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more