Trait Node

Source
pub trait Node<N>: NodeTypesWithEngine + Clone
where N: FullNodeTypes,
{ type ComponentsBuilder: NodeComponentsBuilder<N>; type AddOns: NodeAddOns<NodeAdapter<N, <Self::ComponentsBuilder as NodeComponentsBuilder<N>>::Components>>; // Required methods fn components_builder(&self) -> Self::ComponentsBuilder; fn add_ons(&self) -> Self::AddOns; }
Expand description

A crate::Node is a NodeTypesWithEngine that comes with preconfigured components.

This can be used to configure the builder with a preset of components.

Required Associated Types§

Source

type ComponentsBuilder: NodeComponentsBuilder<N>

The type that builds the node’s components.

Source

type AddOns: NodeAddOns<NodeAdapter<N, <Self::ComponentsBuilder as NodeComponentsBuilder<N>>::Components>>

Exposes the customizable node add-on types.

Required Methods§

Source

fn components_builder(&self) -> Self::ComponentsBuilder

Returns a NodeComponentsBuilder for the node.

Source

fn add_ons(&self) -> Self::AddOns

Returns the node add-ons.

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§

§

impl<N> Node<N> for EthereumNode
where N: FullNodeTypes<Types = EthereumNode>,

§

type ComponentsBuilder = ComponentsBuilder<N, EthereumPoolBuilder, BasicPayloadServiceBuilder<EthereumPayloadBuilder>, EthereumNetworkBuilder, EthereumExecutorBuilder, EthereumConsensusBuilder>

§

type AddOns = EthereumAddOns<NodeAdapter<N, <<EthereumNode as Node<N>>::ComponentsBuilder as NodeComponentsBuilder<N>>::Components>>

§

fn components_builder(&self) -> <EthereumNode as Node<N>>::ComponentsBuilder

§

fn add_ons(&self) -> <EthereumNode as Node<N>>::AddOns

Implementors§

Source§

impl<N, C, AO> Node<N> for AnyNode<N, C, AO>
where N: FullNodeTypes + Clone, C: NodeComponentsBuilder<N> + Clone + Sync + Unpin + 'static, AO: NodeAddOns<NodeAdapter<N, <C as NodeComponentsBuilder<N>>::Components>> + Clone + Sync + Unpin + 'static,

impl<N> Node<N> for TestNode
where N: FullNodeTypes<Types: NodeTypesWithEngine<Engine = EthEngineTypes, ChainSpec = ChainSpec, Primitives = EthPrimitives, Storage = EthStorage>>,

impl<N> Node<N> for OpNode
where N: FullNodeTypes<Types: NodeTypesWithEngine<Engine = OpEngineTypes, ChainSpec = OpChainSpec, Primitives = OpPrimitives, Storage = OpStorage>>,