(&mut self, tool_name: &str, input: &str)
| 449 | |
| 450 | impl ToolExecutor for StaticToolExecutor { |
| 451 | fn execute(&mut self, tool_name: &str, input: &str) -> Result<String, ToolError> { |
| 452 | self.handlers |
| 453 | .get_mut(tool_name) |
| 454 | .ok_or_else(|| ToolError::new(format!("unknown tool: {tool_name}")))?(input) |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | #[cfg(test)] |