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§
Required Methods§
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>,
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>,
type Input<'a> = BlockExecutionInput<'a, BlockWithSenders>
type Output = BlockExecutionOutput<Receipt>
type Error = BlockExecutionError
source§impl<DB> Executor<DB> for NoopBlockExecutorProvider
impl<DB> Executor<DB> for NoopBlockExecutorProvider
type Input<'a> = BlockExecutionInput<'a, BlockWithSenders>
type Output = BlockExecutionOutput<Receipt>
type Error = BlockExecutionError
source§impl<DB> Executor<DB> for MockExecutorProvider
Available on crate feature test-utils
only.
impl<DB> Executor<DB> for MockExecutorProvider
Available on crate feature
test-utils
only.