Trait rmp::decode::RmpRead [−][src]
pub trait RmpRead: Sealed {
type Error: RmpReadErr;
fn read_exact_buf(&mut self, buf: &mut [u8]) -> Result<(), Self::Error>;
fn read_u8(&mut self) -> Result<u8, Self::Error> { ... }
}
Expand description
A type that rmp
supports reading from.
The methods of this trait should be considered an implementation detail (for now). It is currently sealed (can not be implemented by the user).
See also std::io::Read and byteorder::ReadBytesExt
Its primary implementations are std::io::Read and Bytes.
Associated Types
type Error: RmpReadErr
Required methods
Read the exact number of bytes needed to fill the specified buffer.
If there are not enough bytes, this will return an error.
See also std::io::Read::read_exact