pub enum EngineStreamEvent {
Show 16 variants
Thinking(String),
Text(String),
ToolStart {
tool_id: String,
tool_name: String,
},
ToolDelta {
tool_id: String,
delta: String,
},
ToolFinalized {
tool_id: String,
tool_name: String,
input: Value,
},
ToolResultDelta {
tool_id: String,
delta: String,
},
ToolResult {
tool_id: String,
result: String,
},
SubagentStart {
id: u64,
name: String,
task: String,
},
SubagentUpdate {
id: u64,
status: String,
},
SubagentDone {
id: u64,
status: String,
duration_secs: f64,
},
SteeringDelivered {
message: String,
},
Usage {
input_tokens: u64,
output_tokens: u64,
cache_read: u64,
cache_creation: u64,
model: Option<String>,
},
Noop,
Notice(String),
Done,
Error(String),
}Expand description
What happened during a stream event — renderer decides how to display.
Variants§
Thinking(String)
Thinking text arrived.
Text(String)
Response text arrived.
ToolStart
Tool use started.
ToolDelta
Tool use input delta.
ToolFinalized
Tool use finalized.
input is the parsed JSON value, not a stringified version. Renderers
that need a string preview (chat.rs, server’s HistoryEntry::ToolUse)
can call serde_json::to_string themselves; the wire-format ToolUse
in server mode passes the Value through directly.
ToolResultDelta
Tool result delta.
ToolResult
Tool result complete.
SubagentStart
Subagent dispatched.
SubagentUpdate
Subagent status update.
SubagentDone
Subagent finished.
SteeringDelivered
Steering message was delivered.
Usage
Usage stats for this turn.
Fields
Noop
Internal bookkeeping — no visual output.
Notice(String)
Display-only status notice (e.g. API retry). Not part of the transcript.
Done
Stream completed.
Error(String)
Stream errored.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EngineStreamEvent
impl RefUnwindSafe for EngineStreamEvent
impl Send for EngineStreamEvent
impl Sync for EngineStreamEvent
impl Unpin for EngineStreamEvent
impl UnsafeUnpin for EngineStreamEvent
impl UnwindSafe for EngineStreamEvent
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.