pub fn encode_i128(buf: &mut [u8; 17], value: i128) -> usize
Expand description
Encodes an i128
into a buffer, returning the encoded length.
The contents of the buffer beyond the returned length are unspecified.
ยงExamples
let mut buf = [0u8; 17];
let encoded_len = vu128::encode_i128(&mut buf, 123);
assert_eq!(&buf[..encoded_len], &[0xB6, 0x03]);