Function base64::encode [] [src]

pub fn encode(input: &str) -> Result<StringBase64Error>

Encode from string reference as base64. Returns a Result containing a String.

Example

extern crate base64;

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