pub fn decode<T>(input: T) -> Result<Vec<u8>, Error>Expand description
Decode a base64 encoded string using the standard base64 decoding scheme.
§Arguments
input- The base64 encoded input data to decode, which can be any type that implementsAsRef<[u8]>.
§Returns
A Result containing a Vec<u8> with the decoded data, or an error if the input is not valid base64.
§Examples
let encoded = "SGVsbG8sIHdvcmxkIQ==";
let decoded = base64::decode(encoded).expect("Decoding should succeed");
assert_eq!(decoded, b"Hello, world!");