Trait FromJson

Source
pub trait FromJson<T> {
    // Required method
    fn from_json(json: &Value) -> Result<T>;

    // Provided method
    fn from_json_string(json_str: &str) -> Result<T> { ... }
}
Expand description

Convert from JSON to SWIFT message

Required Methods§

Source

fn from_json(json: &Value) -> Result<T>

Parse from JSON Value

Provided Methods§

Source

fn from_json_string(json_str: &str) -> Result<T>

Parse from JSON string

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§