reth::builder::components

Trait NetworkBuilder

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

A type that knows how to build the network implementation.

Required Associated Types§

Source

type Primitives: NetworkPrimitives

The primitive types to use for the network.

Required Methods§

Source

fn build_network( self, ctx: &BuilderContext<Node>, pool: Pool, ) -> impl Future<Output = Result<NetworkHandle<Self::Primitives>, Report>> + 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.

Implementations on Foreign Types§

Source§

impl<Node, Pool> NetworkBuilder<Node, Pool> for EthereumNetworkBuilder
where Pool: TransactionPool + Unpin + 'static, <Pool as TransactionPool>::Transaction: PoolTransaction<Consensus = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::SignedTx, Pooled = PooledTransaction>, Node: FullNodeTypes, <Node as FullNodeTypes>::Types: NodeTypes<ChainSpec = ChainSpec, Primitives = EthPrimitives>,

Implementors§

Source§

impl<Node, P, F, Fut, Pool> NetworkBuilder<Node, Pool> for F
where Node: FullNodeTypes, P: NetworkPrimitives, Pool: TransactionPool, F: Fn(&BuilderContext<Node>, Pool) -> Fut + Send, Fut: Future<Output = Result<NetworkHandle<P>, Report>> + Send,