[][src]Function rmp::decode::read_i64

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

Attempts to read exactly 9 bytes from the given reader and to decode them as i64 value.

The first byte should be the marker and the others should represent the data itself.

Errors

This function will return ValueReadError on any I/O error while reading either the marker or the data.

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.