pub enum StreamEvent {
ContentChunk(String),
ToolCallStart {
id: String,
name: String,
},
ToolCallDelta {
id: String,
delta: Value,
},
ToolCallResult {
id: String,
output: Value,
},
FinalAnswer(String),
Metadata {
key: String,
value: Value,
},
AwaitingApproval {
run_id: String,
prompt: String,
checkpoint_id: String,
},
ThinkingChunk(String),
UsageUpdate {
input_tokens: u32,
output_tokens: u32,
cache_read_tokens: Option<u32>,
cache_write_tokens: Option<u32>,
},
}Variants§
ContentChunk(String)
ToolCallStart
ToolCallDelta
ToolCallResult
FinalAnswer(String)
Metadata
AwaitingApproval
Emitted when an agent pauses at a human-in-the-loop approval gate.
The host application should present prompt to a human, collect their
decision, and resume the graph from checkpoint_id.
Fields
ThinkingChunk(String)
Model reasoning / scratchpad text (Anthropic extended thinking, OpenAI o-series).
UsageUpdate
Token consumption update emitted after each LLM response.
Trait Implementations§
Source§impl Clone for StreamEvent
impl Clone for StreamEvent
Source§fn clone(&self) -> StreamEvent
fn clone(&self) -> StreamEvent
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 moreSource§impl Debug for StreamEvent
impl Debug for StreamEvent
Source§impl PartialEq for StreamEvent
impl PartialEq for StreamEvent
impl StructuralPartialEq for StreamEvent
Auto Trait Implementations§
impl Freeze for StreamEvent
impl RefUnwindSafe for StreamEvent
impl Send for StreamEvent
impl Sync for StreamEvent
impl Unpin for StreamEvent
impl UnsafeUnpin for StreamEvent
impl UnwindSafe for StreamEvent
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