#[non_exhaustive]pub struct Stats {
pub entries: u64,
pub min_timestamp: Option<String>,
pub max_timestamp: Option<String>,
pub tags: Vec<Option<String>>,
}Expand description
Aggregate metadata about the contents of an index.
Produced by Indexer::stats and consumed by the CLI stats subcommand
(milestone 7) and the GET /stats HTTP endpoint (milestone 8). The shape
is intentionally minimal and structural; the CLI and HTTP layers format
it for human or machine consumption.
tags ordering: None (untagged rows) first, then non-null tag strings
in ascending alphabetical order. This ordering is produced directly by
SQLite (ORDER BY tag places NULL first in ascending order) and is not
re-sorted in Rust. The CLI renders the None slot as “(untagged)”.
Marked #[non_exhaustive] so additional summary fields (e.g. distinct
level counts) can be added in later milestones without breaking the
public API.
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.entries: u64Total number of rows currently in the log_entries table.
min_timestamp: Option<String>Lexically smallest timestamp value in the index, or None on an
empty database. Lexical ordering is correct for ISO-8601 timestamps;
see the “live design decisions” section of the project handoff.
max_timestamp: Option<String>Lexically largest timestamp value in the index, or None on an
empty database.
Distinct tag values observed across all rows. None represents rows
with no tag (SQL NULL) and — when present — is always the first
element; non-null tags follow in ascending alphabetical order.