Function data_encoding::encode::encode_mut [] [src]

pub fn encode_mut<B: Base>(base: &B, input: &[u8], output: &mut [u8])

Generic encoding function without allocation (with padding).

This function takes a base implementation, a shared input slice, a mutable output slice, and encodes the input slice to the output slice.

Correctness

The base must satisfy the Base invariants.

Panics

Panics if output.len() != encode_len(input.len()). May also panic if base does not satisfy the Base invariants.