# base64::decode - Rust
API documentation for the Rust `decode` fn in crate `base64`.
Keywords: rust, rustlang, rust-lang, decode

# [−] [src] Function base64::decode

    pub fn decode<T: AsRef<[u8]>>(input: T) -> Result<Vec<u8>, DecodeError>

Decode from string reference as octets. Returns a Result containing a Vec<u8>. Convenience `decode_config(input, base64::STANDARD);`.

# Example

    extern crate base64;

    fn main() {
        let bytes = base64::decode("aGVsbG8gd29ybGQ=").unwrap();
        println!("{:?}", bytes);
    }