pub enum UserEvent {
Progress {
text: String,
},
Structured {
event_type: String,
data: Value,
},
ToolPartialResult {
tool_call_id: String,
content: String,
is_partial: bool,
},
Notice {
kind: NoticeKind,
source: String,
text: String,
},
}Expand description
User-space events produced by tools during execution.
Tools send these through ToolContext::emit_user_event(). The framework
wraps them in RuntimeEvent::UserEvent before delivering to external
consumers.
Variants§
Progress
Tool progress notification.
Structured
User-defined structured event for custom business semantics.
ToolPartialResult
Tool partial result — emitted during long-running tool execution.
is_partial: true means more output is coming; false means this is the final chunk.
Notice
Display-only notice from an engine mechanism (guard degradation,
reaper, …). text is a mechanism-level English fact; product layers
may rewrite it per source. source is a String (not &'static str)
because UserEvent must deserialize across process boundaries.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UserEvent
impl<'de> Deserialize<'de> for UserEvent
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 UserEvent
impl RefUnwindSafe for UserEvent
impl Send for UserEvent
impl Sync for UserEvent
impl Unpin for UserEvent
impl UnsafeUnpin for UserEvent
impl UnwindSafe for UserEvent
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