Skip to main content

JsonCodable

Trait JsonCodable 

Source
pub trait JsonCodable: Sized {
    // Required methods
    fn from_json(v: &Value) -> Result<Self>;
    fn to_json(&self) -> Value;
}
Expand description

A value with a JSON form following the zero-protocol schema.

Required Methods§

Source

fn from_json(v: &Value) -> Result<Self>

Source

fn to_json(&self) -> Value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§