pub fn encode_f64(buf: &mut [u8; 9], value: f64) -> usize
Expand description
Encodes an f64
into a buffer, returning the encoded length.
The contents of the buffer beyond the returned length are unspecified.
ยงExamples
let mut buf = [0u8; 9];
let encoded_len = vu128::encode_f64(&mut buf, 2.5);
assert_eq!(&buf[..encoded_len], &[0x80, 0x11]);