Skip to main content

save_to_string

Function save_to_string 

Source
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 stateGameState::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.