Function rmp::encode::write_uint [] [src]

pub fn write_uint<W>(wr: &mut W, val: u64) -> Result<MarkerValueWriteError> where W: Write

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, except the EINTR, which is handled internally.