Function base64::decode_config
source · [−]Expand description
Decode from string reference as octets.
Returns a Result containing a Vec
Example
extern crate base64;
fn main() {
let bytes = base64::decode_config("aGVsbG8gd29ybGR+Cg==", base64::STANDARD).unwrap();
println!("{:?}", bytes);
let bytes_url = base64::decode_config("aGVsbG8gaW50ZXJuZXR-Cg==", base64::URL_SAFE).unwrap();
println!("{:?}", bytes_url);
}