Trait NodeComponentsBuilder

pub trait NodeComponentsBuilder<Node>: Send
where Node: FullNodeTypes,
{ type Components: NodeComponents<Node>; // Required method fn build_components( self, ctx: &BuilderContext<Node>, ) -> impl Future<Output = Result<Self::Components, Report>> + Send; }
Expand description

A type that configures all the customizable components of the node and knows how to build them.

Implementers of this trait are responsible for building all the components of the node: See NodeComponents.

The ComponentsBuilder is a generic, general purpose implementation of this trait that can be used to customize certain components of the node using the builder pattern and defaults, e.g. Ethereum and Optimism. A type that’s responsible for building the components of the node.

Required Associated Types§

type Components: NodeComponents<Node>

The components for the node with the given types

Required Methods§

fn build_components( self, ctx: &BuilderContext<Node>, ) -> impl Future<Output = Result<Self::Components, Report>> + Send

Consumes the type and returns the created components.

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§

§

impl<Node, Net, F, Fut, Pool, EVM, Cons> NodeComponentsBuilder<Node> for F
where Net: FullNetwork, <Net as NetworkEventListenerProvider>::Primitives: NetPrimitivesFor<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives, PooledTransaction = <<Pool as TransactionPool>::Transaction as PoolTransaction>::Pooled>, Node: FullNodeTypes, F: FnOnce(&BuilderContext<Node>) -> Fut + Send, Fut: Future<Output = Result<Components<Node, Net, Pool, EVM, Cons>, Report>> + Send, Pool: TransactionPool + Unpin + 'static, <Pool as TransactionPool>::Transaction: PoolTransaction<Consensus = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::SignedTx>, EVM: ConfigureEvm<Primitives = <<Node as FullNodeTypes>::Types as NodeTypes>::Primitives> + 'static, Cons: FullConsensus<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives, Error = ConsensusError> + Clone + Unpin + 'static,

§

type Components = Components<Node, Net, Pool, EVM, Cons>

§

impl<Node, PoolB, PayloadB, NetworkB, ExecB, ConsB> NodeComponentsBuilder<Node> for ComponentsBuilder<Node, PoolB, PayloadB, NetworkB, ExecB, ConsB>
where Node: FullNodeTypes, PoolB: PoolBuilder<Node>, <PoolB as PoolBuilder<Node>>::Pool: TransactionPool, NetworkB: NetworkBuilder<Node, <PoolB as PoolBuilder<Node>>::Pool>, <NetworkB as NetworkBuilder<Node, <PoolB as PoolBuilder<Node>>::Pool>>::Network: FullNetwork, <<NetworkB as NetworkBuilder<Node, <PoolB as PoolBuilder<Node>>::Pool>>::Network as NetworkEventListenerProvider>::Primitives: NetPrimitivesFor<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives, PooledTransaction = <<<PoolB as PoolBuilder<Node>>::Pool as TransactionPool>::Transaction as PoolTransaction>::Pooled>, PayloadB: PayloadServiceBuilder<Node, <PoolB as PoolBuilder<Node>>::Pool, <ExecB as ExecutorBuilder<Node>>::EVM>, ExecB: ExecutorBuilder<Node>, ConsB: ConsensusBuilder<Node>,

§

type Components = Components<Node, <NetworkB as NetworkBuilder<Node, <PoolB as PoolBuilder<Node>>::Pool>>::Network, <PoolB as PoolBuilder<Node>>::Pool, <ExecB as ExecutorBuilder<Node>>::EVM, <ConsB as ConsensusBuilder<Node>>::Consensus>