Trait biodivine_sketchbook::sketchbook::JsonSerde  
source · pub trait JsonSerde<'de>:
    Sized
    + Serialize
    + Deserialize<'de> {
    // Provided methods
    fn to_json_str(&self) -> String { ... }
    fn to_pretty_json_str(&self) -> String { ... }
    fn from_json_str(s: &'de str) -> Result<Self, String> { ... }
}Expand description
Trait that implements to_json_str and from_json_str wrappers to serialize and
deserialize objects, utilizing serde_json.
All of the structs implementing JsonSerde must implement traits Serialize and Deserialize.
Provided Methods§
sourcefn to_json_str(&self) -> String
 
fn to_json_str(&self) -> String
Wrapper for json serialization.
sourcefn to_pretty_json_str(&self) -> String
 
fn to_pretty_json_str(&self) -> String
Wrapper for pretty json serialization with indentation.
sourcefn from_json_str(s: &'de str) -> Result<Self, String>
 
fn from_json_str(s: &'de str) -> Result<Self, String>
Wrapper for json de-serialization.
Object Safety§
This trait is not object safe.