Trait reth_evm::execute::Executor

source ·
pub trait Executor<DB> {
    type Input<'a>;
    type Output;
    type Error;

    // Required method
    fn execute(
        self,
        input: Self::Input<'_>,
    ) -> Result<Self::Output, Self::Error>;
}
Expand description

A general purpose executor trait that executes an input (e.g. block) and produces an output (e.g. state changes and receipts).

This executor does not validate the output, see BatchExecutor for that.

Required Associated Types§

source

type Input<'a>

The input type for the executor.

source

type Output

The output type for the executor.

source

type Error

The error type returned by the executor.

Required Methods§

source

fn execute(self, input: Self::Input<'_>) -> Result<Self::Output, Self::Error>

Consumes the type and executes the block.

§Note

Execution happens without any validation of the output. To validate the output, use the BatchExecutor.

§Returns

The output of the block execution.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<A, B, DB> Executor<DB> for Either<A, B>
where A: for<'a> Executor<DB, Input<'a> = BlockExecutionInput<'a, BlockWithSenders>, Output = BlockExecutionOutput<Receipt>, Error = BlockExecutionError>, B: for<'a> Executor<DB, Input<'a> = BlockExecutionInput<'a, BlockWithSenders>, Output = BlockExecutionOutput<Receipt>, Error = BlockExecutionError>, DB: Database<Error: Into<ProviderError> + Display>,

source§

impl<DB> Executor<DB> for NoopBlockExecutorProvider

source§

impl<DB> Executor<DB> for MockExecutorProvider

Available on crate feature test-utils only.