Enum ckb_error::InternalErrorKind
source · [−]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
CapacityOverflow
An arithmetic overflow occurs during capacity calculation, e.g. Capacity::safe_add
DataCorrupted
Persistent data had corrupted
Database
Error occurs during database operations
BlockAssembler
It indicates that the underlying error is BlockAssemblerError
VM
VM internal error
System
Unknown system error
Config
The feature is disabled or is conflicted with the configuration
Other
Other system error
Implementations
sourceimpl InternalErrorKind
impl InternalErrorKind
sourcepub fn because<E>(self, reason: E) -> InternalError where
E: Error + Send + Sync + 'static,
pub fn because<E>(self, reason: E) -> InternalError where
E: Error + Send + Sync + 'static,
Creates InternalError
base on InternalErrorKind
with an error as the reason.
sourcepub fn other<T>(self, reason: T) -> InternalError where
T: Display,
pub fn other<T>(self, reason: T) -> InternalError where
T: Display,
Creates InternalError
base on InternalErrorKind
with a simple string as the reason.
Trait Implementations
sourceimpl Clone for InternalErrorKind
impl Clone for InternalErrorKind
sourcefn clone(&self) -> InternalErrorKind
fn clone(&self) -> InternalErrorKind
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 InternalErrorKind
impl Debug for InternalErrorKind
sourceimpl Display for InternalErrorKind
impl Display for InternalErrorKind
sourceimpl From<InternalErrorKind> for InternalError
impl From<InternalErrorKind> for InternalError
sourcefn from(kind: InternalErrorKind) -> Self
fn from(kind: InternalErrorKind) -> Self
Converts to this type from the input type.
impl Copy for InternalErrorKind
impl Eq for InternalErrorKind
impl StructuralEq for InternalErrorKind
impl StructuralPartialEq for InternalErrorKind
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
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