pub trait Action<I>: Send + 'staticwhere
I: EngineTypes,{
// Required method
fn execute<'a>(
&'a mut self,
env: &'a mut Environment<I>,
) -> BoxFuture<'a, Result<()>>;
}
Expand description
An action that can be performed on an instance.
Actions execute operations and potentially make assertions in a single step.
The action name indicates what it does (e.g., AssertMineBlock
would both
mine a block and assert it worked).
Required Methods§
Sourcefn execute<'a>(
&'a mut self,
env: &'a mut Environment<I>,
) -> BoxFuture<'a, Result<()>>
fn execute<'a>( &'a mut self, env: &'a mut Environment<I>, ) -> BoxFuture<'a, Result<()>>
Executes the action
Implementors§
impl<Engine> Action<Engine> for FinalizeBlock<Engine>where
Engine: EngineTypes,
impl<Engine> Action<Engine> for SendForkchoiceUpdate<Engine>where
Engine: EngineTypes,
impl<Engine> Action<Engine> for SendNewPayload<Engine>where
Engine: EngineTypes + PayloadTypes,
impl<Engine> Action<Engine> for SendNewPayloads<Engine>where
Engine: EngineTypes + PayloadTypes,
impl<Engine> Action<Engine> for CreateFork<Engine>
impl<Engine> Action<Engine> for SetForkBasewhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for SetForkBaseFromBlockInfowhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for ValidateForkwhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for AssertChainTipwhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for CaptureBlockOnNodewhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for CompareNodeChainTipswhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for SelectActiveNodewhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for ValidateBlockTagwhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for WaitForSyncwhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for AssertMineBlock<Engine>where
Engine: EngineTypes,
impl<Engine> Action<Engine> for BroadcastLatestForkchoice
impl<Engine> Action<Engine> for BroadcastNextNewPayload
impl<Engine> Action<Engine> for CheckPayloadAcceptedwhere
Engine: EngineTypes,
Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,
impl<Engine> Action<Engine> for ExpectFcuStatuswhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for GenerateNextPayload
impl<Engine> Action<Engine> for GeneratePayloadAttributeswhere
Engine: EngineTypes + PayloadTypes,
Engine::PayloadAttributes: From<PayloadAttributes>,
impl<Engine> Action<Engine> for PickNextBlockProducerwhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for ProduceBlocks<Engine>
impl<Engine> Action<Engine> for ProduceBlocksLocally<Engine>
impl<Engine> Action<Engine> for ProduceInvalidBlocks<Engine>
impl<Engine> Action<Engine> for TestFcuToTagwhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for UpdateBlockInfowhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for UpdateBlockInfoToLatestPayloadwhere
Engine: EngineTypes + PayloadTypes,
Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,
impl<Engine> Action<Engine> for ValidateCanonicalTagwhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for ReorgTo<Engine>
impl<Engine> Action<Engine> for SetReorgTargetwhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for CaptureBlockwhere
Engine: EngineTypes,
impl<Engine> Action<Engine> for MakeCanonical
impl<I> Action<I> for Sequence<I>
impl<I, F, Fut> Action<I> for F
Implementation of Action
for any function/closure that takes an Environment
reference and returns a Future resolving to Result<()>.
This allows using closures directly as actions with .with_action(async move |env| {...})
.