reth_node_builder::components

Trait NetworkBuilder

Source
pub trait NetworkBuilder<Node: FullNodeTypes, Pool: TransactionPool>: Send {
    // Required method
    fn build_network(
        self,
        ctx: &BuilderContext<Node>,
        pool: Pool,
    ) -> impl Future<Output = Result<NetworkHandle>> + Send;
}
Expand description

A type that knows how to build the network implementation.

Required Methods§

Source

fn build_network( self, ctx: &BuilderContext<Node>, pool: Pool, ) -> impl Future<Output = Result<NetworkHandle>> + Send

Launches the network implementation and returns the handle to it.

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, Pool> NetworkBuilder<Node, Pool> for F
where Node: FullNodeTypes, Pool: TransactionPool, F: Fn(&BuilderContext<Node>, Pool) -> Fut + Send, Fut: Future<Output = Result<NetworkHandle>> + Send,