Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ChrisFeldmeier/OpenCodeRust
/ new
Method
new
crates/opencode-tool/src/registry.rs:16–20 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
14
15
impl ToolRegistry {
16
pub fn new() -> Self {
17
Self {
18
tools: RwLock::new(HashMap::new()),
19
}
20
}
21
22
pub async fn register<T: Tool + 'static>(&self, tool: T) {
23
let mut tools = self.tools.write().await;
Callers
nothing calls this directly
Calls
1
new
Function · 0.85
Tested by
no test coverage detected