pub struct Base64Codec { /* private fields */ }Expand description
Encodes and decodes Base64 byte strings.
Implementations§
Source§impl Base64Codec
impl Base64Codec
Sourcepub fn standard_no_pad() -> Self
pub fn standard_no_pad() -> Self
Sourcepub fn url_safe_no_pad() -> Self
pub fn url_safe_no_pad() -> Self
Sourcepub fn decode(&self, text: &str) -> CodecResult<Vec<u8>>
pub fn decode(&self, text: &str) -> CodecResult<Vec<u8>>
Decodes Base64 text into bytes.
§Parameters
text: Base64 text.
§Returns
Decoded bytes.
§Errors
Returns CodecError::InvalidInput when text is malformed.
Trait Implementations§
Source§impl Clone for Base64Codec
impl Clone for Base64Codec
Source§fn clone(&self) -> Base64Codec
fn clone(&self) -> Base64Codec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Base64Codec
impl Debug for Base64Codec
Source§impl Decoder<str> for Base64Codec
impl Decoder<str> for Base64Codec
Source§impl Default for Base64Codec
impl Default for Base64Codec
Source§impl Encoder<[u8]> for Base64Codec
impl Encoder<[u8]> for Base64Codec
Source§impl PartialEq for Base64Codec
impl PartialEq for Base64Codec
Source§fn eq(&self, other: &Base64Codec) -> bool
fn eq(&self, other: &Base64Codec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for Base64Codec
impl Eq for Base64Codec
impl StructuralPartialEq for Base64Codec
Auto Trait Implementations§
impl Freeze for Base64Codec
impl RefUnwindSafe for Base64Codec
impl Send for Base64Codec
impl Sync for Base64Codec
impl Unpin for Base64Codec
impl UnsafeUnpin for Base64Codec
impl UnwindSafe for Base64Codec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more