base64_simd

Function forgiving_decode

Source
pub fn forgiving_decode<'d>(
    src: &[u8],
    dst: Out<'d, [u8]>,
) -> Result<&'d mut [u8], Error>
Expand description

Forgiving decodes a base64 string to bytes.

This function uses the standard charset.

See https://infra.spec.whatwg.org/#forgiving-base64

§Errors

This function returns Err if the content of src is invalid.

§Panics

This function asserts that src.len() <= dst.len()