pub fn encode_slice(buf: &mut [u8], num: u64) -> Option<usize>Expand description
Encodes a u64 by writing its variable-byte encoding to a slice.
On success, this function returns Some encoding length. Otherwise, the target slice is not
large enough, and the function returns None.