pub enum ExecEvent {
ThreadStarted {
thread_id: String,
thread: Thread,
},
TurnStarted {
thread_id: String,
turn: Turn,
},
TurnCompleted {
thread_id: String,
turn: Turn,
},
TurnFailed {
thread_id: String,
turn_id: String,
error: TurnError,
},
ItemStarted {
thread_id: String,
started_at_ms: i64,
item: ThreadItem,
},
ItemCompleted {
thread_id: String,
completed_at_ms: i64,
item: ThreadItem,
},
Raw {
method: String,
params: Option<Value>,
},
}Expand description
One renderable event. See the module docs for the serialized contract.
Variants§
ThreadStarted
thread.started — thread_id flat (exec shape), full typed thread
riding along.
TurnStarted
turn.started
TurnCompleted
turn.completed — turn_id/status/duration_ms lifted flat
(exec shape); the full typed turn rides along.
TurnFailed
turn.failed — a turn-scoped error notification.
ItemStarted
item.started
ItemCompleted
item.completed
Raw
Any other notification, serialized as the proxy-forwarded shape
{"type": "<method>", "params": …} — slash tags preserved, params
verbatim. Unknown future methods land here, never disappear.
Implementations§
Source§impl ExecEvent
impl ExecEvent
Sourcepub fn from_notification(notification: Notification) -> ExecEvent
pub fn from_notification(notification: Notification) -> ExecEvent
Map one notification onto its exec-style event. Never fails and
never drops: lifecycle notifications get first-class variants,
everything else rides ExecEvent::Raw under its wire method.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ExecEvent
impl<'de> Deserialize<'de> for ExecEvent
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ExecEvent
Auto Trait Implementations§
impl Freeze for ExecEvent
impl RefUnwindSafe for ExecEvent
impl Send for ExecEvent
impl Sync for ExecEvent
impl Unpin for ExecEvent
impl UnsafeUnpin for ExecEvent
impl UnwindSafe for ExecEvent
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