#[non_exhaustive]pub enum Event {
Started {
run_id: String,
},
Stdout {
run_id: String,
line: String,
},
Stderr {
run_id: String,
line: String,
},
Error {
run_id: String,
message: String,
},
Exited {
run_id: String,
exit_code: Option<i32>,
cancelled: bool,
},
}Expand description
Raw events emitted to the caller’s callback during a streaming run.
JSON-tagged so axum SSE and Tauri Channel render identical payloads
on the wire. Harness-neutral: a process-backed adapter parses the
Stdout lines into a normalized event vocabulary (e.g. agent-harness’s RunEvent).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Started
First event. Sent before the child has produced any output so the UI can show a “thinking…” state.
Stdout
Raw stdout line. Process-backed CLIs emit one JSON object per line in their streaming mode. The caller parses.
Stderr
Raw stderr line. Warnings + the occasional error.
Error
Command / IO failure. Terminal — followed by Exited.
Exited
Process exited. Always sent exactly once at the end.
Trait Implementations§
Source§impl Serialize for Event
impl Serialize for Event
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 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