[][src]Trait lib_base64::Base64

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

Required methods

fn encode(&self) -> String

fn decode(&self) -> Result<String, Base64Error>

Loading content...

Implementations on Foreign Types

impl Base64 for String[src]

fn encode(&self) -> String[src]

Encodes a String with the base64 scheme

Example:

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

fn decode(&self) -> Result<String, Base64Error>[src]

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())
Loading content...

Implementors

Loading content...