TryIntoTxEnv

Trait TryIntoTxEnv 

Source
pub trait TryIntoTxEnv<T, BlockEnv = BlockEnv> {
    type Err;

    // Required method
    fn try_into_tx_env<Spec>(
        self,
        cfg_env: &CfgEnv<Spec>,
        block_env: &BlockEnv,
    ) -> Result<T, Self::Err>;
}
Expand description

Converts self into T.

Should create an executable transaction environment using TransactionRequest.

Required Associated Types§

Source

type Err

An associated error that can occur during the conversion.

Required Methods§

Source

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§

Source§

impl TryIntoTxEnv<OpTransaction<TxEnv>> for OpTransactionRequest

Source§

type Err = EthTxEnvError

Source§

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

Implementors§