Function data_encoding::decode::decode_mut
[−]
[src]
pub fn decode_mut<B: Base>(base: &B,
input: &[u8],
output: &mut [u8])
-> Result<usize, Error>
Generic decoding function without allocation (with padding).
This function takes a base implementation, a shared input slice, a mutable output slice, and decodes the input slice to the output slice. It returns the length of the decoded data which may be slightly smaller than the output length when input is padded.
Correctness
The base must satisfy the Base
invariants.
Failures
Decoding may fail in the circumstances defined by
Error
.
Panics
Panics if output.len() != decode_len(input.len())
. May also
panic if base
does not satisfy the Base
invariants.