Struct base64_t::Base64
[−]
[src]
pub struct Base64 { /* fields omitted */ }
Typesafe base64 encoded bytes with an encoding configuration.
Methods
impl Base64
[src]
pub fn new<T: ?Sized + AsRef<[u8]>>(input: &T) -> Self
[src]
Takes the same types base64::encode
.
Default encoding is STANDARD
pub fn with_config<T: ?Sized + AsRef<[u8]>>(input: &T, config: Config) -> Self
[src]
Same as new, just specify a non-STANDARD Config
.
pub fn decode(&self) -> Vec<u8>
[src]
Decodes the encoded Base64, and cannot fail - you can only make a Base64 by encoding data.
pub fn config(&self) -> &Config
[src]
Reference to the Config
used to initalize this Base64.
pub fn encoded(&self) -> &Vec<u8>
[src]
Reference to the encoded bytes, useful when you cannot send the whole struct somewhere.