Skip to main content

DIFConvertible

Trait DIFConvertible 

Source
pub trait DIFConvertible: Serialize + for<'de> Deserialize<'de> {
    // Provided methods
    fn to_json(self) -> String { ... }
    fn to_json_pretty(self) -> String { ... }
    fn from_json(json: &str) -> Self { ... }
    fn as_json(&self) -> String { ... }
    fn as_json_pretty(&self) -> String { ... }
}

Provided Methods§

Source

fn to_json(self) -> String

Source

fn to_json_pretty(self) -> String

Source

fn from_json(json: &str) -> Self

Source

fn as_json(&self) -> String

Source

fn as_json_pretty(&self) -> 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§