pub trait ToolHandler: Send + Sync {
// Required method
fn start(
&self,
call: ToolCall,
context: ToolCallContext,
) -> Result<LinkedToolExecutionHandle, ToolStartError>;
// Provided methods
fn supports_abort(&self) -> bool { ... }
fn supports_isolated_kill(&self) -> bool { ... }
}Expand description
Host-linked tool implementation.
Required Methods§
Sourcefn start(
&self,
call: ToolCall,
context: ToolCallContext,
) -> Result<LinkedToolExecutionHandle, ToolStartError>
fn start( &self, call: ToolCall, context: ToolCallContext, ) -> Result<LinkedToolExecutionHandle, ToolStartError>
Start one execution. Must return a handle with a single completion.
Provided Methods§
Sourcefn supports_abort(&self) -> bool
fn supports_abort(&self) -> bool
Whether cooperative/abort cancellation is honored (D-024 / D-028). Default false (fail-closed): capability booleans must not self-assert.
Sourcefn supports_isolated_kill(&self) -> bool
fn supports_isolated_kill(&self) -> bool
Whether isolated kill after grace is available (D-024 / D-028).
Default false (fail-closed); requires a structural ToolKillHandle.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".