Expand description
Generic JSON state persistence (load/save).
Provides load_state and save_state for any type that implements
serde’s Serialize / DeserializeOwned. State files are written atomically
(write to a temp file, then rename) so a crash mid-write never corrupts the
on-disk state.
Functions§
- load_
state - Load state from a JSON file.
- save_
state - Save state to a JSON file atomically.