Function rmp::decode::read_pfix
[−]
[src]
pub fn read_pfix<R>(rd: &mut R) -> Result<u8, FixedValueReadError> where R: Read
Attempts to read a single byte from the given reader and to decode it as a positive fixnum value.
According to the MessagePack specification, a positive fixed integer value is represented using
a single byte in [0x00; 0x7f]
range inclusively, prepended with a special marker mask.
Errors
This function will return FixedValueReadError
on any I/O error while reading the marker,
except the EINTR, which is handled internally.
It also returns FixedValueReadError::TypeMismatch
if the actual type is not equal with the
expected one, indicating you with the actual type.
Note
This function will silently retry on every EINTR received from the underlying Read
until
successful read.