pub trait Serialization: Sized {
    fn save_to_json(&self) -> Value;
fn load_from_json(value: Value) -> Result<Self>; fn save_to_string(&self) -> String { ... }
fn load_from_str(string: &str) -> Result<Self> { ... } }
Expand description

This trait is implemented by Game and can be used to serialize/deserialize Hex games to/from strings or JSON.

Required methods

Save this game as a Serde JSON value

Load a game from a Serde JSON value.

Provided methods

Save this game to a JSON string.

Load a game from a JSON string.

Implementors