pub trait Serializable {
// Required methods
fn to_json(&self) -> JsonValue;
fn from_json(json: &JsonValue) -> Option<Self>
where Self: Sized;
}Expand description
Trait for serializable types
pub trait Serializable {
// Required methods
fn to_json(&self) -> JsonValue;
fn from_json(json: &JsonValue) -> Option<Self>
where Self: Sized;
}Trait for serializable types