fn base64_data_to_string(base64_bytes: &[u8]) -> Result<String, String> {
    match base64::decode_config(base64_bytes, base64::URL_SAFE) {
        Ok(decode_bytes) => match String::from_utf8(decode_bytes) {
            Ok(string) => Ok(string),
            Err(error) => Err(error.to_string()),
        },
        Err(error) => Err(error.to_string()),
    }
}
/// Decodes base64 bytes to its original String value.
///
/// # Errors
///
/// Returns an error as a string if either the decoding or the bytes conversion to UTF-8 failed.
Decodes base64 bytes to its original String value.
Decodes base64 bytes to its original String value .
fn base64_data_to_string(base64_bytes: &[u8]) -> Result<String, String> {
    match base64::decode_config(base64_bytes, base64::URL_SAFE) {
        Ok(decode_bytes) => match String::from_utf8(decode_bytes) {
            Ok(string) => Ok(string),
            Err(error) => Err(error.to_string()),
        },
        Err(error) => Err(error.to_string()),
    }
}
fn base64_data_to_string ( base64_bytes : & [ u8 ] ) -> Result < String , String > { match base64 :: decode_config ( base64_bytes , base64 :: URL_SAFE ) { Ok ( decode_bytes ) => match String :: from_utf8 ( decode_bytes ) { Ok ( string ) => Ok ( string ) , Err ( error ) => Err ( error . to_string ( ) ) , } , Err ( error ) => Err ( error . to_string ( ) ) , } }
Decodes base64 bytes to its original String value.
Decodes base64 bytes to its original String value .
base64_bytes
&[u8]
base64_bytes
&[u8]
errors
Returns an error as a string if either the decoding or the bytes conversion to UTF-8 failed.
Returns an error as a string if either the decoding or the bytes conversion to UTF - 8 failed .