pub enum UserEvent {
Progress {
text: String,
},
Structured {
event_type: String,
data: Value,
},
ToolPartialResult {
tool_call_id: String,
content: String,
is_partial: bool,
},
}Expand description
Plan / user lifecycle event types surfaced to consumers. 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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UserEvent
impl<'de> Deserialize<'de> for UserEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UserEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UserEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for UserEvent
impl Serialize for UserEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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