Function rmp::decode::read_nil [] [src]

pub fn read_nil<R: Read>(rd: &mut R) -> Result<(), ValueReadError>

Attempts to read a single byte from the given reader and to decode it as a nil value.

According to the MessagePack specification, a nil value is represented as a single 0xc0 byte.

Errors

This function will return ValueReadError on any I/O error while reading the nil 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.