Skip to main content

Module envelope

Module envelope 

Source
Expand description

The versioned --json envelope.

Compatibility contract, and the reason this type is centralized:

  • Fields may be added freely. Consumers must tolerate unknown fields.
  • Fields may not be renamed, retyped, or removed without bumping crate::store::RECORD_VERSION.
  • warden_version tracks the binary; record_version tracks the shape of the rows and of this envelope. A consumer pins on record_version.
  • An unbounded end of the reporting period is reported as null, never as a fabricated date.

Structs§

Envelope
The one shape every --json response has.
Period
The period of a report. null on either end means “unbounded”.

Functions§

iso8601
The one timestamp rendering warden publishes. Every ISO-8601 string in a --json document — envelope period, note text, row fields — goes through here, so a consumer never sees two precisions in one response.
iso8601_ms
The same rendering from epoch millis, for timestamps that are not already bounded into a DateTime.