Action

Trait Action 

Source
pub trait Action<I>: Send + 'static
where 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§

Source

fn execute<'a>( &'a mut self, env: &'a mut Environment<I>, ) -> BoxFuture<'a, Result<()>>

Executes the action

Implementors§

Source§

impl<Engine> Action<Engine> for FinalizeBlock<Engine>
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for SendForkchoiceUpdate<Engine>
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for SendNewPayload<Engine>
where Engine: EngineTypes + PayloadTypes,

Source§

impl<Engine> Action<Engine> for SendNewPayloads<Engine>
where Engine: EngineTypes + PayloadTypes,

Source§

impl<Engine> Action<Engine> for CreateFork<Engine>
where Engine: EngineTypes + PayloadTypes, Engine::PayloadAttributes: From<PayloadAttributes> + Clone, Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,

Source§

impl<Engine> Action<Engine> for SetForkBase
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for SetForkBaseFromBlockInfo
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for ValidateFork
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for AssertChainTip
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for CaptureBlockOnNode
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for CompareNodeChainTips
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for SelectActiveNode
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for ValidateBlockTag
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for WaitForSync
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for AssertMineBlock<Engine>
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for BroadcastLatestForkchoice
where Engine: EngineTypes + PayloadTypes, Engine::PayloadAttributes: From<PayloadAttributes> + Clone, Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,

Source§

impl<Engine> Action<Engine> for BroadcastNextNewPayload
where Engine: EngineTypes + PayloadTypes, Engine::PayloadAttributes: From<PayloadAttributes> + Clone, Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,

Source§

impl<Engine> Action<Engine> for CheckPayloadAccepted
where Engine: EngineTypes, Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,

Source§

impl<Engine> Action<Engine> for ExpectFcuStatus
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for GenerateNextPayload
where Engine: EngineTypes + PayloadTypes, Engine::PayloadAttributes: From<PayloadAttributes> + Clone,

Source§

impl<Engine> Action<Engine> for GeneratePayloadAttributes
where Engine: EngineTypes + PayloadTypes, Engine::PayloadAttributes: From<PayloadAttributes>,

Source§

impl<Engine> Action<Engine> for PickNextBlockProducer
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for ProduceBlocks<Engine>
where Engine: EngineTypes + PayloadTypes, Engine::PayloadAttributes: From<PayloadAttributes> + Clone, Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,

Source§

impl<Engine> Action<Engine> for ProduceBlocksLocally<Engine>
where Engine: EngineTypes + PayloadTypes, Engine::PayloadAttributes: From<PayloadAttributes> + Clone, Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,

Source§

impl<Engine> Action<Engine> for ProduceInvalidBlocks<Engine>
where Engine: EngineTypes + PayloadTypes, Engine::PayloadAttributes: From<PayloadAttributes> + Clone, Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,

Source§

impl<Engine> Action<Engine> for TestFcuToTag
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for UpdateBlockInfo
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for UpdateBlockInfoToLatestPayload
where Engine: EngineTypes + PayloadTypes, Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,

Source§

impl<Engine> Action<Engine> for ValidateCanonicalTag
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for ReorgTo<Engine>
where Engine: EngineTypes + PayloadTypes, Engine::PayloadAttributes: From<PayloadAttributes> + Clone, Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,

Source§

impl<Engine> Action<Engine> for SetReorgTarget
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for CaptureBlock
where Engine: EngineTypes,

Source§

impl<Engine> Action<Engine> for MakeCanonical
where Engine: EngineTypes + PayloadTypes, Engine::PayloadAttributes: From<PayloadAttributes> + Clone, Engine::ExecutionPayloadEnvelopeV3: Into<ExecutionPayloadEnvelopeV3>,

Source§

impl<I> Action<I> for Sequence<I>
where I: EngineTypes + Sync + Send + 'static,

Source§

impl<I, F, Fut> Action<I> for F
where I: EngineTypes, F: FnMut(&Environment<I>) -> Fut + Send + 'static, Fut: Future<Output = Result<()>> + Send + 'static,

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| {...}).