pub fn encode_u64_into(
value: u64,
buf: &mut [u8],
) -> Result<usize, UVarintError>Expand description
Encodes a u64 into a provided buffer, returning the number of bytes written.
§Examples
use uvarint::encode::encode_u64_into;
let mut buf = [0u8; 10];
let n = encode_u64_into(300, &mut buf).unwrap();
assert_eq!(n, 2);
assert_eq!(&buf[..n], &[0xAC, 0x02]);§Errors
Returns UVarintError::BufferTooSmall if the buffer is too small.