Skip to main content

ToolRuntimeHooks

Trait ToolRuntimeHooks 

Source
pub trait ToolRuntimeHooks: Send + Sync {
    // Provided methods
    fn on_execution_start(
        &self,
        _tool_call: &ToolCall,
        _context: &ToolExecutionContext,
    ) { ... }
    fn on_execution_success(
        &self,
        _tool_call: &ToolCall,
        _context: &ToolExecutionContext,
        _result: &ToolExecutionResult,
        _elapsed: Duration,
    ) { ... }
    fn on_execution_failure(
        &self,
        _tool_call: &ToolCall,
        _context: &ToolExecutionContext,
        _error: &ToolError,
        _elapsed: Duration,
    ) { ... }
}

Provided Methods§

Source

fn on_execution_start( &self, _tool_call: &ToolCall, _context: &ToolExecutionContext, )

Source

fn on_execution_success( &self, _tool_call: &ToolCall, _context: &ToolExecutionContext, _result: &ToolExecutionResult, _elapsed: Duration, )

Source

fn on_execution_failure( &self, _tool_call: &ToolCall, _context: &ToolExecutionContext, _error: &ToolError, _elapsed: Duration, )

Implementors§