pub struct RunSummary {
pub run_id: RunId,
pub event_count: u64,
pub first_recorded_at: OffsetDateTime,
pub last_recorded_at: OffsetDateTime,
}Expand description
A one-line-per-run projection of the log, returned by
EventStore::list_runs.
Every field is a pure aggregate over the store’s queryable columns
(COUNT, MIN, MAX), computed without parsing a single envelope or
replaying anything. That is the reason the field set is small and stops
where it does:
run_idnames the run. Required.event_countis how many events the run has, a cheapCOUNT(*)and a useful “how far along” signal.first_recorded_atandlast_recorded_atare the earliest and latest recorded timestamps, aMIN/MAXthat gives a run’s start and its age or most recent activity.
Run status (running, suspended, completed, and so on) is deliberately absent. Status is a replay-time projection: you derive it by folding the log, not by reading a column. Putting it here would either require the store to parse and interpret events (which is the replay engine’s job) or to keep a denormalized status column in step with the log (a second source of truth). Both break the rule that the log is the only state, so status stays out of the store and lives in the replay layer that owns it.
The timestamps are reconstructed in UTC. Fidelity to the exact recorded offset lives in the stored envelope JSON; this summary normalizes to UTC because it exists for sorting and display, not for round-tripping.
Fields§
§run_id: RunIdThe run this summary describes.
event_count: u64How many events the run’s log holds.
first_recorded_at: OffsetDateTimeThe earliest recorded timestamp in the run, in UTC.
last_recorded_at: OffsetDateTimeThe latest recorded timestamp in the run, in UTC.
Trait Implementations§
Source§impl Clone for RunSummary
impl Clone for RunSummary
Source§fn clone(&self) -> RunSummary
fn clone(&self) -> RunSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more