#[non_exhaustive]pub struct Event {
pub v: u32,
pub seq: u64,
pub time: String,
pub run: Option<String>,
pub op: Option<Op>,
pub operation: Option<OperationId>,
pub kind: EventKind,
}Expand description
One event of the stream.
Every event of an operation has run and op. An event written outside one (Event::new)
has those its writer knows. The command line’s own: a command line it refused has neither;
reap’s closing result and error have neither; any other failure before an operation
began has op when the command is an operation, and run when --name named it (a failure
of status, console, events or key has no op).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.v: u32The stream’s version (1).
seq: u64Its place in the operation, from 1.
time: StringWhen (YYYY-MM-DDTHH:MM:SSZ, UTC).
run: Option<String>The run’s name: on every event of an operation; outside one, when its writer knows it
(see Event).
op: Option<Op>The operation: on every event of an operation; outside one, when its writer knows it (see
Event).
operation: Option<OperationId>The operation’s id in the home’s journal: on every event of a journaled operation.
kind: EventKindWhat happened.
Implementations§
Source§impl Event
impl Event
Sourcepub fn new(
seq: u64,
run: Option<String>,
op: Option<Op>,
kind: EventKind,
) -> Event
pub fn new( seq: u64, run: Option<String>, op: Option<Op>, kind: EventKind, ) -> Event
An event an embedder writes itself, timed now, with the run and op it knows: the runner
numbers and writes its own. For what no operation reports, such as a command that couldn’t
start one (an error with code usage).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Event, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Event, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Event
impl JsonSchema for Event
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more