pub fn read_bool<R: RmpRead>(
rd: &mut R,
) -> Result<bool, ValueReadError<R::Error>>
Expand description
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 ValueReadError
on any I/O error while reading the bool marker,
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.
§Note
This function will silently retry on every EINTR received from the underlying Read
until
successful read.