Function base64::encode[][src]

pub fn encode<T: AsRef<[u8]>>(input: T) -> String

Encode arbitrary octets as base64. Returns a String. Convenience for encode_config(input, base64::STANDARD);.

Example

extern crate base64;

fn main() {
    let b64 = base64::encode(b"hello world");
    println!("{}", b64);
}