TryIntoTxEnv

Trait TryIntoTxEnv 

Source
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>;
}
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

Available on crate feature op only.
Source§

type Err = EthTxEnvError

Source§

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

Source§

impl TryIntoTxEnv<TxEnv> for TransactionRequest

Source§

type Err = EthTxEnvError

Source§

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

Implementors§