reth::builder::hooks

Trait OnComponentInitializedHook

source
pub trait OnComponentInitializedHook<Node>: Send {
    // Required method
    fn on_event(self: Box<Self>, node: Node) -> Result<(), Report>;
}
Expand description

A helper trait for the event hook that is run once the node is initialized.

Required Methods§

source

fn on_event(self: Box<Self>, node: Node) -> 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> OnComponentInitializedHook<Node> for ()

source§

fn on_event(self: Box<()>, _node: Node) -> Result<(), Report>

Implementors§

source§

impl<Node, F> OnComponentInitializedHook<Node> for F
where F: FnOnce(Node) -> Result<(), Report> + Send,