pub struct WatchRecord {
pub seq: Option<u64>,
pub raw: Value,
pub event: Option<Box<Event>>,
}Expand description
One journal record: the flat EventLine shape exactly as written —
{"seq":N,"type":...}, whichever vintage of journal it came from
(events::EventTail already normalizes the pre-0.6 nested wrapper) — with
basis’s typed basis::Event alongside it, when this build recognizes
the type it names.
raw is never re-derived from event: basis::Event’s own fields do not
include seq (the journal writer splices it in), so reserializing event
would drop it. raw is the wire contract (ADR-0015) — what --json
output reproduces verbatim — and event is read-side convenience for a
host that would rather match on a type.
Fields§
§seq: Option<u64>This record’s sequence number, monotonic within one task — None
only for a line whose seq is missing or not a number, which no
writer this crate ever produces but a hand-edited or foreign-written
journal could. Never silently 0: that is a real sequence number
(the journal’s first line), and reporting it for a line that carried
none would be indistinguishable from that line.
raw: ValueThe exact JSON on disk.
event: Option<Box<Event>>raw, typed — None for a record a newer basis wrote with a type
this build does not know. The enum is #[non_exhaustive] for exactly
this: a host can still show or forward raw for a record it cannot
fully type.
Trait Implementations§
Source§impl Clone for WatchRecord
impl Clone for WatchRecord
Source§fn clone(&self) -> WatchRecord
fn clone(&self) -> WatchRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more