MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / remove

Method remove

crates/opencode-plugin/src/lib.rs:204–212  ·  view source on GitHub ↗
(&self, event: &HookEvent, name: &str)

Source from the content-addressed store, hash-verified

202 }
203
204 pub async fn remove(&self, event: &HookEvent, name: &str) -> bool {
205 let mut hooks = self.hooks.write().await;
206 if let Some(hook_list) = hooks.get_mut(event) {
207 let initial_len = hook_list.len();
208 hook_list.retain(|h| h.name != name);
209 return hook_list.len() < initial_len;
210 }
211 false
212 }
213
214 pub async fn list(&self) -> Vec<(HookEvent, String, bool)> {
215 let hooks = self.hooks.read().await;

Callers 3

register_client_hooksMethod · 0.45
respondMethod · 0.45
clear_sessionMethod · 0.45

Calls 1

get_mutMethod · 0.45

Tested by

no test coverage detected