Skip to main content

FromEvmError

Trait FromEvmError 

Source
pub trait FromEvmError<Evm>:
    FromEthApiError
    + From<BlockExecutionError>
    + FromEvmHalt<InstrStop>
    + FromRevert
where Evm: ConfigureEvm,
{ // Provided methods fn from_evm_err(err: BlockExecutionError) -> Self { ... } fn ensure_success<EvmTypes>( result: TxResultExt<<EvmTypes as EvmTypesHost>::TxResultExt>, ) -> Result<Bytes, Self> where EvmTypes: EvmTypes { ... } }
Available on crate feature rpc only.
Expand description

Helper trait to convert from EVM errors.

Provided Methods§

Source

fn from_evm_err(err: BlockExecutionError) -> Self

Converts an execution error before chain-specific details are erased by the RPC mapping.

Source

fn ensure_success<EvmTypes>( result: TxResultExt<<EvmTypes as EvmTypesHost>::TxResultExt>, ) -> Result<Bytes, Self>
where EvmTypes: EvmTypes,

Ensures the execution result is successful or returns an error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, Evm> FromEvmError<Evm> for T