Skip to main content

ToolHandler

Trait ToolHandler 

Source
pub trait ToolHandler:
    Send
    + Sync
    + 'static {
    // Required method
    fn redact_error(&self, message: &str) -> String;
}
Expand description

Backend handler hooks the tool registry calls at tool-call time.

Required Methods§

Source

fn redact_error(&self, message: &str) -> String

Rewrites a tool error message before it is returned to the client.

Backends use this to apply PII redaction to error text. The returned string is sent verbatim, so implementations must fail closed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§