pub trait ReadBytes {
type Error: Debug;
// Required method
fn next_n<'buf>(
&mut self,
buf: &'buf mut [u8],
) -> Result<&'buf [u8], Self::Error>;
// Provided methods
fn skip_n(&mut self, n: usize) -> Result<usize, Self::Error> { ... }
fn total_byte_hint(&self) -> Option<usize> { ... }
}