Enum ckb_error::InternalErrorKind [−][src]
pub enum InternalErrorKind { CapacityOverflow, DataCorrupted, Database, BlockAssembler, VM, System, Config, Other, }
Expand description
A list specifying categories of ckb internal error.
This list is intended to grow over time and it is not recommended to exhaustively match against it.
It is used with the InternalError
.
Variants
An arithmetic overflow occurs during capacity calculation, e.g. Capacity::safe_add
Persistent data had corrupted
Error occurs during database operations
It indicates that the underlying error is BlockAssemblerError
VM internal error
Unknown system error
The feature is disabled or is conflicted with the configuration
Other system error
Implementations
impl InternalErrorKind
[src]
impl InternalErrorKind
[src]pub fn because<E>(self, reason: E) -> InternalError where
E: Error + Send + Sync + 'static,
[src]
pub fn because<E>(self, reason: E) -> InternalError where
E: Error + Send + Sync + 'static,
[src]Creates InternalError
base on InternalErrorKind
with an error as the reason.
pub fn other<T>(self, reason: T) -> InternalError where
T: Display,
[src]
pub fn other<T>(self, reason: T) -> InternalError where
T: Display,
[src]Creates InternalError
base on InternalErrorKind
with a simple string as the reason.
Trait Implementations
impl Clone for InternalErrorKind
[src]
impl Clone for InternalErrorKind
[src]fn clone(&self) -> InternalErrorKind
[src]
fn clone(&self) -> InternalErrorKind
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for InternalErrorKind
[src]
impl Debug for InternalErrorKind
[src]impl Display for InternalErrorKind
[src]
impl Display for InternalErrorKind
[src]impl From<InternalErrorKind> for InternalError
[src]
impl From<InternalErrorKind> for InternalError
[src]fn from(kind: InternalErrorKind) -> Self
[src]
fn from(kind: InternalErrorKind) -> Self
[src]Performs the conversion.
impl PartialEq<InternalErrorKind> for InternalErrorKind
[src]
impl PartialEq<InternalErrorKind> for InternalErrorKind
[src]impl Copy for InternalErrorKind
[src]
impl Eq for InternalErrorKind
[src]
impl StructuralEq for InternalErrorKind
[src]
impl StructuralPartialEq for InternalErrorKind
[src]
Auto Trait Implementations
impl RefUnwindSafe for InternalErrorKind
impl Send for InternalErrorKind
impl Sync for InternalErrorKind
impl Unpin for InternalErrorKind
impl UnwindSafe for InternalErrorKind
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more