Trait ExecutableTxParts
pub trait ExecutableTxParts<TxEnv, T> {
type Recovered: RecoveredTx<T>;
// Required method
fn into_parts(self) -> (TxEnv, Self::Recovered);
}Expand description
Helper trait to encapsulate requirements for a type to be used as input for BlockExecutor.
This trait combines the requirements for a transaction to be executable by a block executor:
- Must be convertible to the EVM’s transaction environment, such as revm’s
TxEnv - Must provide access to the transaction and signer via
RecoveredTx
The trait ensures that the block executor can both execute the transaction in the EVM and access the original transaction data for receipt generation.
§Implementations
The following implementations are provided:
Recovered<T>andRecovered<&T>- owned recovered transactionsWithEncoded<Recovered<T>>andWithEncoded<&Recovered<T>>- encoded transactionsEither<L, R>where bothLandRimplement this trait&SwhereS: ToTxEnv + RecoveredTx- covers&Recovered<T>,&WithEncoded<...>, etc.
Required Associated Types§
type Recovered: RecoveredTx<T>
type Recovered: RecoveredTx<T>
The recovered transaction accessor type.
Required Methods§
fn into_parts(self) -> (TxEnv, Self::Recovered)
fn into_parts(self) -> (TxEnv, Self::Recovered)
Converts the transaction into the executable transaction environment (TxEnv) and the
original recovered transaction.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
§impl<'a, S, TxEnv, T> ExecutableTxParts<TxEnv, T> for &'a Swhere
S: ToTxEnv<TxEnv> + RecoveredTx<T>,
Blanket implementation for references to types implementing both ToTxEnv and
RecoveredTx.
impl<'a, S, TxEnv, T> ExecutableTxParts<TxEnv, T> for &'a Swhere
S: ToTxEnv<TxEnv> + RecoveredTx<T>,
Blanket implementation for references to types implementing both ToTxEnv and
RecoveredTx.
This covers:
&Recovered<T>and&Recovered<&T>&WithEncoded<Recovered<T>>and similar wrappers- Any
&SwhereS: ToTxEnv<TxEnv> + RecoveredTx<T>