Function rmp::decode::read_fixext2
[−]
[src]
pub fn read_fixext2<R>(rd: &mut R) -> Result<(i8, [u8; 2]), ValueReadError> where R: Read
Attempts to read exactly 4 bytes from the given reader and interpret them as a fixext2 type with data attached.
According to the MessagePack specification, a fixext2 stores an integer and a byte array whose
length is 2 bytes. Its marker byte is 0xd5
.
Note, that this function copies a byte array from the reader to the output buffer, which is unlikely if you want zero-copy functionality.
Errors
This function will return ValueReadError
on any I/O error while reading either the marker or
the data.