pub struct Event {Show 13 fields
pub schema: &'static str,
pub seq: u64,
pub time: String,
pub run_id: String,
pub command: &'static str,
pub kind: EventKind,
pub step: Option<String>,
pub status: Option<String>,
pub reason: Option<Reason>,
pub exit_code: Option<i32>,
pub duration_ms: Option<u64>,
pub stream: Option<ChildStream>,
pub data_b64: Option<String>,
}Expand description
One event on the stream.
Every field is present on every event — absent values serialize as
null rather than disappearing — so a consumer can parse one shape.
Fields§
§schema: &'static strThe envelope version, on every line.
seq: u64Monotonic sequence number within the run.
time: StringWall-clock UTC, RFC 3339.
run_id: StringThe run this event belongs to.
command: &'static strThe subcommand emitting the stream.
kind: EventKindWhat happened.
step: Option<String>The step concerned, where there is one.
status: Option<String>The step’s result, on a finish event.
reason: Option<Reason>The reason, on a failure.
exit_code: Option<i32>The child’s exit code, where one exists.
duration_ms: Option<u64>How long the step took, on a finish event.
stream: Option<ChildStream>Which stream a child_output chunk came from.
data_b64: Option<String>The chunk’s bytes, base64-encoded so invalid UTF-8 travels losslessly; the journal transcript keeps the raw bytes in order.
Implementations§
Source§impl Event
impl Event
Sourcepub const fn opening(
seq: u64,
time: String,
run_id: String,
command: &'static str,
) -> Self
pub const fn opening( seq: u64, time: String, run_id: String, command: &'static str, ) -> Self
The opening event of a stream: everything nullable is null.
Sourcepub fn child_output(self, stream: ChildStream, bytes: &[u8]) -> Self
pub fn child_output(self, stream: ChildStream, bytes: &[u8]) -> Self
A child_output event carrying one chunk of a child’s output.