Adds an RPC hook that will run when RPC modules are configured.
(mut self, hook: F)
| 130 | |
| 131 | /// Adds an RPC hook that will run when RPC modules are configured. |
| 132 | pub fn add_rpc_module<F>(mut self, hook: F) -> Self |
| 133 | where |
| 134 | F: FnOnce(&mut BaseRpcContext<'_>) -> Result<()> + Send + 'static, |
| 135 | { |
| 136 | self.rpc_hooks.push(Box::new(hook)); |
| 137 | self |
| 138 | } |
| 139 | |
| 140 | /// Adds an add-ons hook that will run when the add-ons are configured. |
| 141 | pub fn add_add_ons_hook<F>(mut self, hook: F) -> Self |