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.