Skip to main content

Node

Trait Node 

Source
pub trait Node<N: FullNodeTypes>: NodeTypes + 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;

    // Provided method
    fn disabled_stages() -> &'static [StageId] { ... }
}
Expand description

A crate::Node is a NodeTypes 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.

Provided Methods§

Source

fn disabled_stages() -> &'static [StageId]

Returns the stages that should be disabled for this node.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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