pub fn decode(input: &str) -> Result<Vec<u8>, DecodeError> {
    base64::decode_config(
        input
            .replace('+', "-")
            .replace('/', "_")
            .trim_end_matches('='),
        base64::URL_SAFE_NO_PAD,
    )
}
/// Decode the given string as base64.
/// Standard and URL-safe character sets are both supported,
/// padding is optional.
Decode the given string as base64.
Standard and URL-safe character sets are both supported,
padding is optional.
Decode the given string as base64 . Standard and URL - safe character sets are both supported padding is optional .
pub fn decode(input: &str) -> Result<Vec<u8>, DecodeError> {
    base64::decode_config(
        input
            .replace('+', "-")
            .replace('/', "_")
            .trim_end_matches('='),
        base64::URL_SAFE_NO_PAD,
    )
}
pub fn decode ( input : & str ) -> Result < Vec < u8 > , DecodeError > { base64 :: decode_config ( input . replace ( '+' , " " ) . replace ( '/' , " " ) . trim_end_matches ( '=' ) , base64 :: URL_SAFE_NO_PAD , ) }
Decode the given string as base64.
Decode the given string as base64 .
input
&str
input
&str