rmp::encode

Function write_uint

Source
pub fn write_uint<W: RmpWrite>(
    wr: &mut W,
    val: u64,
) -> Result<Marker, ValueWriteError<W::Error>>
Expand description

Encodes and attempts to write an u64 value into the given write using the most efficient representation, returning the marker used.

This function obeys the MessagePack specification, which requires that the serializer SHOULD use the format which represents the data in the smallest number of bytes.

The first byte becomes the marker and the others (if present, up to 9) will represent the data itself.

ยงErrors

This function will return ValueWriteError on any I/O error occurred while writing either the marker or the data.