Function data_encoding::decode::decode_nopad_mut [] [src]

pub fn decode_nopad_mut<B: Base>(base: &B,
                                 input: &[u8],
                                 output: &mut [u8])
                                 -> Result<(), Error>

Generic decoding function without allocation (without padding).

This function takes a base implementation, a shared input slice, a mutable output slice, and decodes the input slice to the output slice. The input must not be padded.

Correctness

The base must satisfy the Base invariants.

Failures

Decoding may fail in the circumstances defined by Error. Padding are unexpected characters.

Panics

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