MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / unsubscribe

Method unsubscribe

crates/opencode-core/src/bus.rs:92–97  ·  view source on GitHub ↗
(&self, event_type: &str, id: u64)

Source from the content-addressed store, hash-verified

90 }
91
92 pub async fn unsubscribe(&self, event_type: &str, id: u64) {
93 let mut subscribers = self.subscribers.write().await;
94 if let Some(subs) = subscribers.get_mut(event_type) {
95 subs.retain(|s| s.id != id);
96 }
97 }
98
99 pub async fn subscribe_all<F>(&self, callback: F) -> u64
100 where

Callers

nothing calls this directly

Calls 1

get_mutMethod · 0.45

Tested by

no test coverage detected