(&self, tool: T)
| 20 | } |
| 21 | |
| 22 | pub async fn register<T: Tool + 'static>(&self, tool: T) { |
| 23 | let mut tools = self.tools.write().await; |
| 24 | tools.insert(tool.id().to_string(), Arc::new(tool)); |
| 25 | } |
| 26 | |
| 27 | pub async fn get(&self, id: &str) -> Option<Arc<dyn Tool>> { |
| 28 | let tools = self.tools.read().await; |
no test coverage detected