pub trait Tool {
// Required methods
fn description(&self) -> ToolDescription;
fn invoke(&self, input: Value) -> Result<Value, String>;
// Provided method
fn matches(&self, name: &str) -> bool { ... }
}
pub trait Tool {
// Required methods
fn description(&self) -> ToolDescription;
fn invoke(&self, input: Value) -> Result<Value, String>;
// Provided method
fn matches(&self, name: &str) -> bool { ... }
}