LaunchNode

Trait LaunchNode 

Source
pub trait LaunchNode<Target>: Send {
    type Node;
    type Future: IntoFuture<Output = Result<Self::Node>, IntoFuture: Send>;

    // Required method
    fn launch_node(self, target: Target) -> Self::Future;
}
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 EngineNodeLauncher and NodeBuilderWithComponents::launch_with

Required Associated Types§

Source

type Node

The node type that is created.

Source

type Future: IntoFuture<Output = Result<Self::Node>, IntoFuture: Send>

The future type that is returned.

Required Methods§

Source

fn launch_node(self, target: Target) -> Self::Future

Create and return a new node asynchronously.

Implementors§

Source§

impl<F, Target, Fut, Node> LaunchNode<Target> for F
where F: FnOnce(Target) -> Fut + Send, Fut: IntoFuture<Output = Result<Node>, IntoFuture: Send> + Send,

Source§

type Node = Node

Source§

type Future = Fut

Source§

impl<L, Target, N, AddOns> LaunchNode<Target> for DebugNodeLauncher<L>
where Target: Send + 'static, N: FullNodeComponents<Types: DebugNode<N>>, AddOns: RethRpcAddOns<N> + 'static, L: LaunchNode<Target, Node = NodeHandle<N, AddOns>> + 'static,

Source§

type Node = NodeHandle<N, AddOns>

Source§

type Future = DebugNodeLauncherFuture<L, Target, N>

Source§

impl<T, CB, AO> LaunchNode<NodeBuilderWithComponents<T, CB, AO>> for EngineNodeLauncher
where T: FullNodeTypes<Types: NodeTypesForProvider, Provider = BlockchainProvider<NodeTypesWithDBAdapter<<T as FullNodeTypes>::Types, <T as FullNodeTypes>::DB>>>, CB: NodeComponentsBuilder<T> + 'static, AO: RethRpcAddOns<NodeAdapter<T, CB::Components>> + EngineValidatorAddOn<NodeAdapter<T, CB::Components>> + 'static,