mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: use FnOnce on WithLaunchContext methods (#7989)
This commit is contained in:
@ -316,7 +316,7 @@ where
|
||||
/// Sets the hook that is run once the node's components are initialized.
|
||||
pub fn on_component_initialized<F>(self, hook: F) -> Self
|
||||
where
|
||||
F: Fn(NodeAdapter<RethFullAdapter<DB, T>, CB::Components>) -> eyre::Result<()>
|
||||
F: FnOnce(NodeAdapter<RethFullAdapter<DB, T>, CB::Components>) -> eyre::Result<()>
|
||||
+ Send
|
||||
+ 'static,
|
||||
{
|
||||
@ -330,7 +330,9 @@ where
|
||||
/// Sets the hook that is run once the node has started.
|
||||
pub fn on_node_started<F>(self, hook: F) -> Self
|
||||
where
|
||||
F: Fn(FullNode<NodeAdapter<RethFullAdapter<DB, T>, CB::Components>>) -> eyre::Result<()>
|
||||
F: FnOnce(
|
||||
FullNode<NodeAdapter<RethFullAdapter<DB, T>, CB::Components>>,
|
||||
) -> eyre::Result<()>
|
||||
+ Send
|
||||
+ 'static,
|
||||
{
|
||||
@ -344,7 +346,7 @@ where
|
||||
/// Sets the hook that is run once the rpc server is started.
|
||||
pub fn on_rpc_started<F>(self, hook: F) -> Self
|
||||
where
|
||||
F: Fn(
|
||||
F: FnOnce(
|
||||
RpcContext<'_, NodeAdapter<RethFullAdapter<DB, T>, CB::Components>>,
|
||||
RethRpcServerHandles,
|
||||
) -> eyre::Result<()>
|
||||
@ -361,7 +363,7 @@ where
|
||||
/// Sets the hook that is run to configure the rpc modules.
|
||||
pub fn extend_rpc_modules<F>(self, hook: F) -> Self
|
||||
where
|
||||
F: Fn(
|
||||
F: FnOnce(
|
||||
RpcContext<'_, NodeAdapter<RethFullAdapter<DB, T>, CB::Components>>,
|
||||
) -> eyre::Result<()>
|
||||
+ Send
|
||||
@ -381,7 +383,7 @@ where
|
||||
/// The ExEx ID must be unique.
|
||||
pub fn install_exex<F, R, E>(self, exex_id: impl Into<String>, exex: F) -> Self
|
||||
where
|
||||
F: Fn(ExExContext<NodeAdapter<RethFullAdapter<DB, T>, CB::Components>>) -> R
|
||||
F: FnOnce(ExExContext<NodeAdapter<RethFullAdapter<DB, T>, CB::Components>>) -> R
|
||||
+ Send
|
||||
+ 'static,
|
||||
R: Future<Output = eyre::Result<E>> + Send,
|
||||
|
||||
Reference in New Issue
Block a user