Trait lib_base64::Base64[][src]

pub trait Base64 {
    fn encode(&self) -> Result<String, Base64Error>;
fn decode(&self) -> Result<String, Base64Error>; }

Required methods

Implementations on Foreign Types

Encodes a String with the base64 scheme

Example:

use lib_base64::Base64;
let s = String::from("Test");
assert_eq!(Ok(String::from("VGVzdA==")), s.encode())

Decodes a String encoded with the base64 scheme

Example:

use lib_base64::Base64;
let s = String::from("VGVzdA==");
assert_eq!(Ok(String::from("Test")), s.decode())

Implementors