Expand description
Snapshot persistence: serialize a ScanReport to
<home>/snapshots/<UTC-ts>.json and load the newest snapshot back.
§Filename format
%Y-%m-%d-%H%M%S.json (UTC). Lexicographic order on the filename
matches chronological order, which load_latest relies on to find
the previous snapshot without a separate index file.
§Loading
load_latest returns Ok(None) when no snapshot directory exists yet
(first-ever run); any JSON parse failure on an existing snapshot is
surfaced as Error::Scan.
Functions§
- load_
latest - Load the newest snapshot (lexicographic = chronological order for the
stamp format). Returns
Ok(None)when the directory does not yet exist (first-ever scan). - save
- Persist a
ScanReportunder<paths.home>/snapshots/<UTC-ts>.jsonand return the path written.