Skip to main content

ToolHandler

Trait ToolHandler 

Source
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§

Source

fn start( &self, call: ToolCall, context: ToolCallContext, ) -> Result<LinkedToolExecutionHandle, ToolStartError>

Start one execution. Must return a handle with a single completion.

Provided Methods§

Source

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.

Source

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".

Implementors§