reth::builder::exex

Trait LaunchExEx

Source
pub trait LaunchExEx<Node>: Send
where Node: FullNodeComponents,
{ // Required method fn launch( self, ctx: ExExContext<Node>, ) -> impl Future<Output = Result<impl Future<Output = Result<(), Report>> + Send, Report>> + Send; }
Expand description

A trait for launching an ExEx.

Required Methods§

Source

fn launch( self, ctx: ExExContext<Node>, ) -> impl Future<Output = Result<impl Future<Output = Result<(), Report>> + Send, Report>> + Send

Launches the ExEx.

The ExEx should be able to run independently and emit events on the channels provided in the ExExContext.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Node, F, Fut, E> LaunchExEx<Node> for F
where Node: FullNodeComponents, F: FnOnce(ExExContext<Node>) -> Fut + Send, Fut: Future<Output = Result<E, Report>> + Send, E: Future<Output = Result<(), Report>> + Send,

Implements LaunchExEx for any closure that takes an ExExContext and returns a future resolving to an ExEx.