Skip to main content

encode

Function encode 

Source
pub fn encode(v: u64, out: &mut Vec<u8>) -> Result<(), EncodeError>
Expand description

Appends the shortest encoding of v.

§Errors

TooLarge "varint" above MAX: a caller bug, since every value this crate’s users encode is a length or an identifier far below it. Nothing is written on error.