LaunchNode

Trait LaunchNode 

Source
pub trait LaunchNode<Target>: Send {
    type Node;
    type Future: IntoFuture<Output = Result<Self::Node, Report>>
       where <Self::Future as IntoFuture>::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, Report>> where <Self::Future as IntoFuture>::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, Report>> + Send, <Fut as IntoFuture>::IntoFuture: 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, <N as FullNodeTypes>::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