pub trait Json<'a> {
type Item;
// Provided methods
fn from_json(s: &'a str) -> Result<Self::Item>
where <Self as Json<'a>>::Item: Deserialize<'a> { ... }
fn to_json(&self) -> Result<String>
where Self: Serialize { ... }
fn into_json(self) -> Result<String>
where Self: Serialize + Sized { ... }
}Required Associated Types§
Provided Methods§
fn from_json(s: &'a str) -> Result<Self::Item>
fn to_json(&self) -> Result<String>where
Self: Serialize,
fn into_json(self) -> Result<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.