pub trait Deserialize: Sized {
// Required method
fn deserialize<D: Deserializer>(deserializer: &mut D) -> Self;
}Expand description
A value type that can be read from a Deserializer.
Required Methods§
Sourcefn deserialize<D: Deserializer>(deserializer: &mut D) -> Self
fn deserialize<D: Deserializer>(deserializer: &mut D) -> Self
Read one value.
This returns Self, not a Result, so an impl signals a malformed value
by panicking. The String impl panics on a length that overruns the
input or on invalid UTF-8. A caller reading untrusted bytes should guard
against a panic here.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".