Enum InternalBlockExecutionError
pub enum InternalBlockExecutionError {
EVM {
hash: FixedBytes<32>,
error: AnyError,
},
Other(AnyError),
}Expand description
Internal, i.e. not validation or consensus related, block executor errors.
Variants§
EVM
EVM error occurred when executing a transaction.
Other(AnyError)
Arbitrary block executor error.
Implementations§
§impl InternalBlockExecutionError
impl InternalBlockExecutionError
pub fn other<E>(error: E) -> InternalBlockExecutionError
pub fn other<E>(error: E) -> InternalBlockExecutionError
Create a new InternalBlockExecutionError::Other variant.
pub fn msg(msg: impl Display) -> InternalBlockExecutionError
pub fn msg(msg: impl Display) -> InternalBlockExecutionError
Create a new InternalBlockExecutionError::Other from a message.
pub const fn as_other(&self) -> Option<&AnyError>
pub const fn as_other(&self) -> Option<&AnyError>
Returns the arbitrary error if this is InternalBlockExecutionError::Other.
pub fn downcast_other<T>(&self) -> Option<&T>where
T: Error + 'static,
pub fn downcast_other<T>(&self) -> Option<&T>where
T: Error + 'static,
Returns a reference to the InternalBlockExecutionError::Other value if it has type T.
pub fn is_other<T>(&self) -> boolwhere
T: Error + 'static,
pub fn is_other<T>(&self) -> boolwhere
T: Error + 'static,
Returns true if this is an InternalBlockExecutionError::Other of type T.
pub const fn as_evm(&self) -> Option<(&FixedBytes<32>, &AnyError)>
pub const fn as_evm(&self) -> Option<(&FixedBytes<32>, &AnyError)>
Returns the EVM error and transaction hash if this is InternalBlockExecutionError::EVM.
pub fn downcast_evm<T>(&self) -> Option<&T>where
T: Error + 'static,
pub fn downcast_evm<T>(&self) -> Option<&T>where
T: Error + 'static,
Returns a reference to the inner EVM error if it is of type T.
pub fn is_evm<T>(&self) -> boolwhere
T: Error + 'static,
pub fn is_evm<T>(&self) -> boolwhere
T: Error + 'static,
Returns true if this is an InternalBlockExecutionError::EVM error of type T.
Trait Implementations§
§impl Debug for InternalBlockExecutionError
impl Debug for InternalBlockExecutionError
§impl Display for InternalBlockExecutionError
impl Display for InternalBlockExecutionError
§impl Error for InternalBlockExecutionError
impl Error for InternalBlockExecutionError
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
§impl From<InternalBlockExecutionError> for BlockExecutionError
impl From<InternalBlockExecutionError> for BlockExecutionError
§fn from(source: InternalBlockExecutionError) -> BlockExecutionError
fn from(source: InternalBlockExecutionError) -> BlockExecutionError
Auto Trait Implementations§
impl !RefUnwindSafe for InternalBlockExecutionError
impl !UnwindSafe for InternalBlockExecutionError
impl Freeze for InternalBlockExecutionError
impl Send for InternalBlockExecutionError
impl Sync for InternalBlockExecutionError
impl Unpin for InternalBlockExecutionError
impl UnsafeUnpin for InternalBlockExecutionError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for Twhere
T: Debug,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes
Size for each variant:
EVM: 48 bytesOther: 24 bytes