pub trait Deserializer: Sized {
// Required method
fn deserialize<R: Read>(reader: &mut R) -> Result<Self>;
// Provided method
fn try_from_slice(slice: &[u8]) -> Result<Self> { ... }
}
Required Methods§
fn deserialize<R: Read>(reader: &mut R) -> Result<Self>
Provided Methods§
fn try_from_slice(slice: &[u8]) -> Result<Self>
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.