pub trait Tool: Send + Sync {
// Required methods
fn spec(&self) -> &ToolSpec;
fn call(&self, ctx: &CallCtx<'_>, args: Value) -> Result<Value, ToolError>;
// Provided method
fn subject(&self, _args: &Value) -> Option<String> { ... }
}Required Methods§
fn spec(&self) -> &ToolSpec
fn call(&self, ctx: &CallCtx<'_>, args: Value) -> Result<Value, ToolError>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".