rmp::decode

Function read_fixext8

Source
pub fn read_fixext8<R: RmpRead>(
    rd: &mut R,
) -> Result<(i8, [u8; 8]), ValueReadError<R::Error>>
Expand description

Attempts to read exactly 10 bytes from the given reader and interpret them as a fixext8 type with data attached.

According to the MessagePack specification, a fixext8 stores an integer and a byte array whose length is 8 bytes. Its marker byte is 0xd7.

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.