pub trait PrefixedRead: Sized {
// Required method
fn read_prefixed_bound<P: TryInto<usize> + ReadFrom>(
data: &mut Cursor<&[u8]>,
bound: usize,
) -> Result<Self>;
// Provided method
fn read_prefixed<P: TryInto<usize> + ReadFrom>(
data: &mut Cursor<&[u8]>,
) -> Result<Self> { ... }
}Expand description
A trait for reading prefixed data from a cursor.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".