Trait ToBase64
Other items inphollaits
pub trait ToBase64 { fn base64(self) -> String; }
fn base64(self) -> String
method converts the input to a base64 encoded String.
extern crate phollaits; use phollaits::{ToBase64}; fn main() { let a = "Teststring".to_string(); assert_eq!(a.base64(), "VGVzdHN0cmluZw==".to_string()); }
impl ToBase64 for String
impl ToBase64 for &str
impl ToBase64 for Vec<u8>