pub trait Tool: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn spec(&self) -> ToolSpec;
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
arguments: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
The core Tool trait. Each tool implements this.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".