embedded_jsonrpc::varint

Function encode

Source
pub fn encode(value: usize, buf: &mut [u8]) -> usize
Expand description

Encodes a usize into a varint and writes it into the provided buffer. Returns the number of bytes written.