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>> + Send;
}
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>> + Send

Create and return a new node asynchronously.

Object Safety§

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, T, CB, AO> LaunchNode<NodeBuilderWithComponents<T, CB, AO>> for DefaultNodeLauncher
where Types: NodeTypesWithDB<ChainSpec: EthereumHardforks + EthChainSpec> + NodeTypesWithEngine, T: FullNodeTypes<Provider = BlockchainProvider<Types>, Types = Types>, CB: NodeComponentsBuilder<T>, AO: NodeAddOns<NodeAdapter<T, CB::Components>, EthApi: EthApiBuilderProvider<NodeAdapter<T, CB::Components>> + FullEthApiServer + AddDevSigners>,

source§

impl<Types, T, CB, AO> LaunchNode<NodeBuilderWithComponents<T, CB, AO>> for EngineNodeLauncher
where Types: ProviderNodeTypes + NodeTypesWithEngine, T: FullNodeTypes<Types = Types, Provider = BlockchainProvider2<Types>>, CB: NodeComponentsBuilder<T>, AO: NodeAddOns<NodeAdapter<T, CB::Components>, EthApi: EthApiBuilderProvider<NodeAdapter<T, CB::Components>> + FullEthApiServer + AddDevSigners>,