pub fn encode_to_slice<T: VarIntTarget>(num: T, slice: &mut [u8]) -> u8
Available with target feature sse2 only.
Expand description

Encodes a single number to a varint, and writes the resulting data to the slice. Returns the number of bytes written (maximum 10 bytes).

See also: encode

Panics: if the slice is too small to contain the varint.