pub enum HeaderErrorKind {
InvalidParent,
Pow,
Timestamp,
Number,
Epoch,
Version,
}Expand description
A list specifying categories of ckb header error.
This list is intended to grow over time and it is not recommended to exhaustively match against it.
It is used with the HeaderError.
Variants§
InvalidParent
It indicates that the underlying error is InvalidParentError.
Pow
It indicates that the underlying error is PowError.
Timestamp
It indicates that the underlying error is TimestampError.
Number
It indicates that the underlying error is NumberError.
Epoch
It indicates that the underlying error is EpochError.
Version
It indicates that the underlying error is BlockVersionError.
Implementations§
source§impl HeaderErrorKind
impl HeaderErrorKind
sourcepub fn because<E>(self, reason: E) -> HeaderErrorwhere
E: Error + Send + Sync + 'static,
pub fn because<E>(self, reason: E) -> HeaderErrorwhere E: Error + Send + Sync + 'static,
Creates HeaderError base on HeaderErrorKind with an error as the reason.
sourcepub fn other<T>(self, reason: T) -> HeaderErrorwhere
T: Display,
pub fn other<T>(self, reason: T) -> HeaderErrorwhere T: Display,
Creates HeaderError base on HeaderErrorKind with a simple string as the reason.
Trait Implementations§
source§impl Clone for HeaderErrorKind
impl Clone for HeaderErrorKind
source§fn clone(&self) -> HeaderErrorKind
fn clone(&self) -> HeaderErrorKind
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 HeaderErrorKind
impl Debug for HeaderErrorKind
source§impl Display for HeaderErrorKind
impl Display for HeaderErrorKind
source§impl From<HeaderErrorKind> for Error
impl From<HeaderErrorKind> for Error
source§fn from(error: HeaderErrorKind) -> Self
fn from(error: HeaderErrorKind) -> Self
Converts to this type from the input type.
source§impl From<HeaderErrorKind> for HeaderError
impl From<HeaderErrorKind> for HeaderError
source§fn from(kind: HeaderErrorKind) -> Self
fn from(kind: HeaderErrorKind) -> Self
Converts to this type from the input type.
source§impl PartialEq for HeaderErrorKind
impl PartialEq for HeaderErrorKind
source§fn eq(&self, other: &HeaderErrorKind) -> bool
fn eq(&self, other: &HeaderErrorKind) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for HeaderErrorKind
impl Eq for HeaderErrorKind
impl StructuralEq for HeaderErrorKind
impl StructuralPartialEq for HeaderErrorKind
Auto Trait Implementations§
impl RefUnwindSafe for HeaderErrorKind
impl Send for HeaderErrorKind
impl Sync for HeaderErrorKind
impl Unpin for HeaderErrorKind
impl UnwindSafe for HeaderErrorKind
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