reth_node_builder::node

Trait Node

Source
pub trait Node<N: FullNodeTypes>: NodeTypesWithEngine + Clone {
    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.

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::Components>> + Clone + Sync + Unpin + 'static,