reth_node_builder::hooks

Trait OnNodeStartedHook

Source
pub trait OnNodeStartedHook<Node: FullNodeComponents, AddOns: NodeAddOns<Node>>: Send {
    // Required method
    fn on_event(self: Box<Self>, node: FullNode<Node, AddOns>) -> Result<()>;
}
Expand description

A helper trait that is run once the node is started.

Required Methods§

Source

fn on_event(self: Box<Self>, node: FullNode<Node, AddOns>) -> Result<()>

Consumes the event hook and runs it.

If this returns an error, the node launch will be aborted.

Implementations on Foreign Types§

Source§

impl<Node, AddOns> OnNodeStartedHook<Node, AddOns> for ()
where Node: FullNodeComponents, AddOns: NodeAddOns<Node>,

Source§

fn on_event(self: Box<Self>, _node: FullNode<Node, AddOns>) -> Result<()>

Implementors§

Source§

impl<Node, AddOns, F> OnNodeStartedHook<Node, AddOns> for F
where Node: FullNodeComponents, AddOns: NodeAddOns<Node>, F: FnOnce(FullNode<Node, AddOns>) -> Result<()> + Send,