[−][src]Function il2_ilint::encode
pub fn encode(value: u64, enc: &mut [u8]) -> Result<usize>
Encodes the given value into a ILInt value.
Arguments:
value
: The value to be encoded;enc
: The slice that will receive the encoded value. It must have at least encoded_size(value) bytes;
Returns:
Ok(size)
: The number of bytes used.Err(ErrorKind::InsufficientBuffer)
: If the buffer is too small to hold the encoded value.