pub trait Decode: Sized {
// Required method
fn decode<R: Read>(reader: &mut R) -> Result<Self>;
// Provided method
fn decode_from_bytes(bytes: &[u8]) -> Result<Self> { ... }
}
Expand description
Hardware and language independent decoding. Uses the Reader pattern for efficient decoding.
Required Methods§
Provided Methods§
fn decode_from_bytes(bytes: &[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.