pub trait ReadBuffer {
// Required method
fn read_n<const N: usize>(&mut self) -> Result<[u8; N], UcPackError>;
// Provided method
fn read_u8(&mut self) -> Result<u8, UcPackError> { ... }
}Expand description
A readable buffer. Implemented by cursor types.
You have to provide a method to copy-read N bytes from the buffer.
Required Methods§
Provided Methods§
fn read_u8(&mut self) -> Result<u8, UcPackError>
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.