Skip to main content

FromEvmError

Trait FromEvmError 

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 { ... } }
Expand description

Helper trait to convert from EVM errors.

Provided Methods§

fn from_evm_err(err: BlockExecutionError) -> Self

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

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§

§

impl<T, Evm> FromEvmError<Evm> for T
where T: FromEthApiError + From<BlockExecutionError> + FromEvmHalt<InstrStop> + FromRevert, Evm: ConfigureEvm,