Function rmp::decode::read_bool
[−]
[src]
pub fn read_bool<R>(rd: &mut R) -> Result<bool, FixedValueReadError> where R: Read
Attempts to read a single byte from the given reader and to decode it as a boolean value.
According to the MessagePack specification, an encoded boolean value is represented as a single byte.
Errors
This function will return FixedValueReadError
on any I/O error while reading the bool 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.