pub trait Json<Target: Serialize + DeserializeOwned>: Sized + Debug {
// Required methods
fn to_json(self) -> Target;
fn from_json(json: Target) -> Result<Self>;
}Expand description
A trait for types that can be encoded and decoded to and from JSON.
Required Methods§
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.