reth::builder::components

Trait NodeComponentsBuilder

Source
pub trait NodeComponentsBuilder<Node>: Send
where Node: FullNodeTypes,
{ type Components: NodeComponents<Node, PayloadBuilder = PayloadBuilderHandle<<<Node as FullNodeTypes>::Types as NodeTypesWithEngine>::Engine>>; // 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§

Source

type Components: NodeComponents<Node, PayloadBuilder = PayloadBuilderHandle<<<Node as FullNodeTypes>::Types as NodeTypesWithEngine>::Engine>>

The components for the node with the given types

Required Methods§

Source

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§

Source§

impl<Node, N, F, Fut, Pool, EVM, Executor, Cons> NodeComponentsBuilder<Node> for F
where N: NetworkPrimitives<BlockHeader = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockHeader, BlockBody = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockBody>, Node: FullNodeTypes, F: FnOnce(&BuilderContext<Node>) -> Fut + Send, Fut: Future<Output = Result<Components<Node, N, Pool, EVM, Executor, 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<Header = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockHeader, Transaction = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::SignedTx>, Executor: BlockExecutorProvider<Primitives = <<Node as FullNodeTypes>::Types as NodeTypes>::Primitives>, Cons: FullConsensus<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives> + Clone + Unpin + 'static,

Source§

type Components = Components<Node, N, Pool, EVM, Executor, Cons>

Source§

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, <<PoolB as PoolBuilder<Node>>::Pool as TransactionPool>::Transaction: PoolTransaction<Pooled = <<NetworkB as NetworkBuilder<Node, <PoolB as PoolBuilder<Node>>::Pool>>::Primitives as NetworkPrimitives>::PooledTransaction>, NetworkB: NetworkBuilder<Node, <PoolB as PoolBuilder<Node>>::Pool>, <NetworkB as NetworkBuilder<Node, <PoolB as PoolBuilder<Node>>::Pool>>::Primitives: NetworkPrimitives<BlockHeader = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockHeader, BlockBody = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockBody>, PayloadB: PayloadServiceBuilder<Node, <PoolB as PoolBuilder<Node>>::Pool>, ExecB: ExecutorBuilder<Node>, ConsB: ConsensusBuilder<Node>,

Source§

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