pub trait JsonDeserialize<'de>: Sized {
// Required method
fn json_deserialize(parser: &mut JsonParser<'de>) -> Result<Self>;
}Expand description
Trait for types that can be deserialized from JSON
The lifetime parameter 'de represents the lifetime of the data being deserialized,
which allows for zero-copy deserialization when possible.
Required Methods§
Sourcefn json_deserialize(parser: &mut JsonParser<'de>) -> Result<Self>
fn json_deserialize(parser: &mut JsonParser<'de>) -> Result<Self>
Deserialize a value from the given parser
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.