pub enum AgentEvent {
TurnStart {
turn: u32,
},
TextDelta {
text: String,
},
ThinkingDelta {
text: String,
},
ToolCall {
id: String,
name: String,
input: Value,
},
ToolResult {
id: String,
name: String,
output: String,
success: bool,
},
TextComplete {
text: String,
},
TurnEnd {
turn: u32,
reason: TurnEndReason,
},
Error {
message: String,
},
}Expand description
An event emitted by the agent during execution.
Variants§
TurnStart
A new agent turn has started.
TextDelta
Streaming text delta from the assistant.
ThinkingDelta
Streaming thinking/reasoning delta from the assistant.
ToolCall
The assistant is requesting a tool call.
ToolResult
A tool has returned a result.
Fields
TextComplete
The assistant’s text response is complete for this turn.
TurnEnd
A turn has ended.
Error
An error occurred during agent execution.
Trait Implementations§
Source§impl Clone for AgentEvent
impl Clone for AgentEvent
Source§fn clone(&self) -> AgentEvent
fn clone(&self) -> AgentEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentEvent
impl RefUnwindSafe for AgentEvent
impl Send for AgentEvent
impl Sync for AgentEvent
impl Unpin for AgentEvent
impl UnwindSafe for AgentEvent
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