Trait Tool
Source pub trait Tool: Send + Sync {
// Required methods
fn definition(&self) -> ToolDefinition;
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn name(&self) -> &str { ... }
fn version(&self) -> &str { ... }
fn description(&self) -> &str { ... }
fn author(&self) -> &str { ... }
fn validate_input(&self, input: &str) -> Result<(), ToolError> { ... }
}