pub trait Decode<'de>: Sized {
// Required method
fn decode(src: &mut ReadCursor<'de>) -> DecodeResult<Self>;
}
Expand description
Trait for types that can be decoded from a byte stream.
This trait is implemented by types that can be deserialized from a sequence of bytes.
Required Methods§
Sourcefn decode(src: &mut ReadCursor<'de>) -> DecodeResult<Self>
fn decode(src: &mut ReadCursor<'de>) -> DecodeResult<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.