pub fn save_to_string(state: &GameState) -> Result<String>Expand description
Serialize the live state to its on-disk JSON form. The version field
is whatever the caller has on state — GameState::default() and the
migration chain both stamp CURRENT_VERSION, so the only way to write
a wrong version is to mutate state.version by hand, which nothing does.