MCPcopy Index your code
hub / github.com/AI45Lab/Code / register_handler

Method register_handler

core/src/hooks/engine.rs:264–267  ·  view source on GitHub ↗

Register a handler

(&self, hook_id: &str, handler: Arc<dyn HookHandler>)

Source from the content-addressed store, hash-verified

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) {

Calls 2

write_or_recoverFunction · 0.85
insertMethod · 0.45