[][src]Function varint_simd::encode_to_slice

pub fn encode_to_slice<T: VarIntTarget>(num: T, slice: &mut [u8]) -> u8

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.