pub trait Read: Sized + NumBytes {
// Required method
fn read(bytes: &[u8], pos: &mut usize) -> Result<Self, ReadError>;
// Provided method
fn unpack<T: AsRef<[u8]>>(bytes: T) -> Result<Self, ReadError> { ... }
}
Expand description
Read bytes.
Required Methods§
Provided Methods§
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.