Skip to main content

Event

Struct Event 

Source
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 str

The envelope version, on every line.

§seq: u64

Monotonic sequence number within the run.

§time: String

Wall-clock UTC, RFC 3339.

§run_id: String

The run this event belongs to.

§command: &'static str

The subcommand emitting the stream.

§kind: EventKind

What 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

Source

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.

Source

pub fn child_output(self, stream: ChildStream, bytes: &[u8]) -> Self

A child_output event carrying one chunk of a child’s output.

Trait Implementations§

Source§

impl Debug for Event

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for Event

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.