pub enum Event {
OnStart {
runnable: String,
run_id: Uuid,
input: Value,
},
OnNodeStart {
node: String,
step: u64,
run_id: Uuid,
},
OnNodeEnd {
node: String,
step: u64,
output: Value,
run_id: Uuid,
},
OnLlmToken {
token: String,
run_id: Uuid,
},
OnToolStart {
tool: String,
args: Value,
run_id: Uuid,
},
OnToolEnd {
tool: String,
result: Value,
run_id: Uuid,
},
OnError {
error: String,
run_id: Uuid,
},
OnEnd {
runnable: String,
run_id: Uuid,
output: Value,
},
OnCheckpoint {
step: u64,
run_id: Uuid,
},
Custom {
kind: String,
payload: Value,
run_id: Uuid,
},
}Expand description
A structured event emitted by stream_events() — exposes per-step
graph activity, tool calls, token deltas, and errors.
Variants§
OnStart
A Runnable started.
Fields
OnNodeStart
A graph node started.
OnNodeEnd
A graph node finished.
Fields
OnLlmToken
LLM emitted a token.
OnToolStart
Tool execution started.
Fields
OnToolEnd
Tool execution finished.
Fields
OnError
A Runnable errored.
OnEnd
A Runnable finished successfully.
Fields
OnCheckpoint
A graph engine persisted a checkpoint at a superstep boundary.
Custom
User-emitted event from a graph node via NodeCtx::write_custom.
Carries an arbitrary kind label and a JSON payload — the consumer
decides how to interpret it. Used by StreamMode::Custom to surface
node-authored progress signals without cluttering the typed enum.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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 Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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