reth_node_builder

Trait LaunchNode

Source
pub trait LaunchNode<Target> {
    type Node;

    // Required method
    fn launch_node(
        self,
        target: Target,
    ) -> impl Future<Output = Result<Self::Node>>;
}
Expand description

A general purpose trait that launches a new node of any kind.

Acts as a node factory that targets a certain node configuration and returns a handle to the node.

This is essentially the launch logic for a node.

See also DefaultNodeLauncher and NodeBuilderWithComponents::launch_with

Required Associated Types§

Source

type Node

The node type that is created.

Required Methods§

Source

fn launch_node(self, target: Target) -> impl Future<Output = Result<Self::Node>>

Create and return a new node asynchronously.

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<F, Target, Fut, Node> LaunchNode<Target> for F
where F: FnOnce(Target) -> Fut + Send, Fut: Future<Output = Result<Node>> + Send,

Source§

type Node = Node

Source§

impl<Types, DB, T, CB, AO> LaunchNode<NodeBuilderWithComponents<T, CB, AO>> for DefaultNodeLauncher
where Types: NodeTypesWithEngine + NodeTypesForTree, DB: Database + DatabaseMetrics + DatabaseMetadata + Clone + Unpin + 'static, T: FullNodeTypes<Provider = BlockchainProvider<NodeTypesWithDBAdapter<Types, DB>>, Types = Types, DB = DB>, CB: NodeComponentsBuilder<T>, AO: RethRpcAddOns<NodeAdapter<T, CB::Components>>,

Source§

impl<Types, DB, T, CB, AO> LaunchNode<NodeBuilderWithComponents<T, CB, AO>> for EngineNodeLauncher
where Types: NodeTypesForProvider + NodeTypesWithEngine<Primitives = EthPrimitives>, DB: Database + DatabaseMetrics + DatabaseMetadata + Clone + Unpin + 'static, T: FullNodeTypes<Types = Types, DB = DB, Provider = BlockchainProvider2<NodeTypesWithDBAdapter<Types, DB>>>, CB: NodeComponentsBuilder<T>, AO: RethRpcAddOns<NodeAdapter<T, CB::Components>> + EngineValidatorAddOn<NodeAdapter<T, CB::Components>, Validator: EngineValidator<Types::Engine, Block = BlockTy<Types>>>, LocalPayloadAttributesBuilder<Types::ChainSpec>: PayloadAttributesBuilder<<<Types as NodeTypesWithEngine>::Engine as PayloadTypes>::PayloadAttributes>,