Register a handler
(&self, hook_id: &str, handler: Arc<dyn HookHandler>)
| 262 | |
| 263 | /// Register a handler |
| 264 | pub fn register_handler(&self, hook_id: &str, handler: Arc<dyn HookHandler>) { |
| 265 | let mut handlers = write_or_recover(&self.handlers); |
| 266 | handlers.insert(hook_id.to_string(), handler); |
| 267 | } |
| 268 | |
| 269 | /// Unregister a handler |
| 270 | pub fn unregister_handler(&self, hook_id: &str) { |