Function rmp::decode::read_u8
[−]
[src]
pub fn read_u8<R>(rd: &mut R) -> Result<u8, ValueReadError> where R: Read
Attempts to read exactly 2 bytes from the given reader and to decode them as u8
value.
The first byte should be the marker and the second one should represent the data itself.
Errors
This function will return ValueReadError
on any I/O error while reading either the marker or
the data, except the EINTR, which is handled internally.
It also returns ValueReadError::TypeMismatch
if the actual type is not equal with the
expected one, indicating you with the actual type.