pub struct ToolEvent {
pub call_id: String,
pub tool_name: String,
pub phase: ToolEventPhase,
pub elapsed_ms: Option<u64>,
pub is_mutating: bool,
pub auto_approved: bool,
pub summary: Option<String>,
pub error: Option<String>,
}Expand description
A structured event emitted during tool execution.
Fields§
§call_id: StringTool call ID (matches ToolCall.id)
tool_name: StringCanonical tool name
phase: ToolEventPhaseCurrent lifecycle phase
elapsed_ms: Option<u64>Wall-clock duration since the call began (None for Begin phase)
is_mutating: boolWhether the tool is mutating (writes files, runs commands, etc.)
auto_approved: boolWhether the execution was auto-approved (no user prompt)
summary: Option<String>Human-readable summary (e.g. file paths affected, command preview)
error: Option<String>Error message if phase == Error
Implementations§
Source§impl ToolEvent
impl ToolEvent
Sourcepub fn into_agent_event(self) -> AgentEvent
pub fn into_agent_event(self) -> AgentEvent
Convert this event into an AgentEvent::ToolLifecycle for streaming
through the agent event channel to the UI.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolEvent
impl<'de> Deserialize<'de> for ToolEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ToolEvent
impl RefUnwindSafe for ToolEvent
impl Send for ToolEvent
impl Sync for ToolEvent
impl Unpin for ToolEvent
impl UnsafeUnpin for ToolEvent
impl UnwindSafe for ToolEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more