pub fn decode<T: ?Sized + AsRef<[u8]>>(
input: &T,
) -> Result<Vec<u8>, DecodeError>
Expand description
Decode from string reference as octets.
Returns a Result containing a Vecdecode_config(input, base64::STANDARD);
.
ยงExample
extern crate base64;
fn main() {
let bytes = base64::decode("aGVsbG8gd29ybGQ=").unwrap();
println!("{:?}", bytes);
}