TryIntoTxEnv

Trait TryIntoTxEnv 

pub trait TryIntoTxEnv<T> {
    type Err;

    // Required method
    fn try_into_tx_env<Spec>(
        self,
        cfg_env: &CfgEnv<Spec>,
        block_env: &BlockEnv,
    ) -> Result<T, Self::Err>;
}
Available on crate feature node-api only.
Expand description

Converts self into T.

Should create an executable transaction environment using TransactionRequest.

Required Associated Types§

type Err

An associated error that can occur during the conversion.

Required Methods§

fn try_into_tx_env<Spec>( self, cfg_env: &CfgEnv<Spec>, block_env: &BlockEnv, ) -> Result<T, Self::Err>

Performs the conversion.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl TryIntoTxEnv<OpTransaction<TxEnv>> for OpTransactionRequest

§

type Err = EthTxEnvError

§

fn try_into_tx_env<Spec>( self, cfg_env: &CfgEnv<Spec>, block_env: &BlockEnv, ) -> Result<OpTransaction<TxEnv>, <OpTransactionRequest as TryIntoTxEnv<OpTransaction<TxEnv>>>::Err>

Implementors§