Register a hook
(&self, hook: Hook)
| 250 | |
| 251 | /// Register a hook |
| 252 | pub fn register(&self, hook: Hook) { |
| 253 | let mut hooks = write_or_recover(&self.hooks); |
| 254 | hooks.insert(hook.id.clone(), hook); |
| 255 | } |
| 256 | |
| 257 | /// Unregister a hook |
| 258 | pub fn unregister(&self, hook_id: &str) -> Option<Hook> { |