pub trait Input {
type Error;
// Required method
fn read(&mut self, into: &mut [u8]) -> Result<(), Self::Error>;
// Provided method
fn read_byte(&mut self) -> Result<u8, Self::Error> { ... }
}Expand description
Trait that allows reading of data into a slice.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".