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,