reth::builder::hooks

Trait OnNodeStartedHook

Source
pub trait OnNodeStartedHook<Node, AddOns>: Send
where Node: FullNodeComponents, AddOns: NodeAddOns<Node>,
{ // Required method fn on_event( self: Box<Self>, node: FullNode<Node, AddOns>, ) -> Result<(), Report>; }
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<(), Report>

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<()>, _node: FullNode<Node, AddOns>) -> Result<(), Report>

Implementors§

Source§

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