pub trait SessionHooks: Send + Sync {
// Provided methods
fn on_session_start(&self, _session_id: &str) { ... }
fn on_turn_start(&self, _session_id: &str, _task: &str) { ... }
fn on_tool_call(&self, _invocation: &ToolInvocation) { ... }
fn on_tool_result(&self, _result: &ToolResult) { ... }
fn on_turn_end(&self, _session_id: &str, _output: &str) { ... }
fn on_session_end(&self, _session_id: &str) { ... }
}Provided Methods§
fn on_session_start(&self, _session_id: &str)
fn on_turn_start(&self, _session_id: &str, _task: &str)
fn on_tool_call(&self, _invocation: &ToolInvocation)
fn on_tool_result(&self, _result: &ToolResult)
fn on_turn_end(&self, _session_id: &str, _output: &str)
fn on_session_end(&self, _session_id: &str)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".