Enum ckb_verification::HeaderErrorKind
source · [−]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
sourceimpl HeaderErrorKind
impl HeaderErrorKind
sourcepub fn because<E>(self, reason: E) -> HeaderError where
E: Error + Send + Sync + 'static,
pub fn because<E>(self, reason: E) -> HeaderError where
E: Error + Send + Sync + 'static,
Creates HeaderError base on HeaderErrorKind with an error as the reason.
sourcepub fn other<T>(self, reason: T) -> HeaderError where
T: Display,
pub fn other<T>(self, reason: T) -> HeaderError where
T: Display,
Creates HeaderError base on HeaderErrorKind with a simple string as the reason.
Trait Implementations
sourceimpl Clone for HeaderErrorKind
impl Clone for HeaderErrorKind
sourcefn clone(&self) -> HeaderErrorKind
fn clone(&self) -> HeaderErrorKind
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 HeaderErrorKind
impl Debug for HeaderErrorKind
sourceimpl Display for HeaderErrorKind
impl Display for HeaderErrorKind
sourceimpl From<HeaderErrorKind> for Error
impl From<HeaderErrorKind> for Error
sourcefn from(error: HeaderErrorKind) -> Self
fn from(error: HeaderErrorKind) -> Self
Converts to this type from the input type.
sourceimpl From<HeaderErrorKind> for HeaderError
impl From<HeaderErrorKind> for HeaderError
sourcefn from(kind: HeaderErrorKind) -> Self
fn from(kind: HeaderErrorKind) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<HeaderErrorKind> for HeaderErrorKind
impl PartialEq<HeaderErrorKind> for HeaderErrorKind
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
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