pub trait ToolExecute: Send + Sync {
// Required method
fn execute(&self, input: JsonValue, ctx: ToolContext) -> ToolOutputStream;
}Expand description
Executes a tool.
Implement this for custom execution strategies (remote execution,
recording); ordinary tools use the closure adapters on crate::ToolBuilder.
Implementations receive input that already passed the tool’s input
schema and must honour ctx.cancellation.
Required Methods§
Sourcefn execute(&self, input: JsonValue, ctx: ToolContext) -> ToolOutputStream
fn execute(&self, input: JsonValue, ctx: ToolContext) -> ToolOutputStream
Starts an execution.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".