Struct base64_simd::Base64
source · [−]pub struct Base64 { /* private fields */ }
Expand description
Implementations
sourceimpl Base64
impl Base64
sourcepub fn encode<'s, 'd>(
&self,
src: &'s [u8],
dst: OutBuf<'d>
) -> Result<&'d mut [u8], Error>
pub fn encode<'s, 'd>(
&self,
src: &'s [u8],
dst: OutBuf<'d>
) -> Result<&'d mut [u8], Error>
Encodes src
and writes to dst
.
Errors
This function returns Err
if:
- The length of
dst
is not enough.
sourceimpl Base64
impl Base64
sourceimpl Base64
impl Base64
sourcepub const STANDARD: Self = Self {
kind: Base64Kind::Standard,
padding: true,
}
pub const STANDARD: Self = Self { kind: Base64Kind::Standard, padding: true, }
Standard charset with padding.
sourcepub const STANDARD_NO_PAD: Self = Self {
kind: Base64Kind::Standard,
padding: false,
}
pub const STANDARD_NO_PAD: Self = Self { kind: Base64Kind::Standard, padding: false, }
Standard charset without padding.
sourcepub const URL_SAFE: Self = Self {
kind: Base64Kind::UrlSafe,
padding: true,
}
pub const URL_SAFE: Self = Self { kind: Base64Kind::UrlSafe, padding: true, }
URL-safe charset with padding.
sourcepub const URL_SAFE_NO_PAD: Self = Self {
kind: Base64Kind::UrlSafe,
padding: false,
}
pub const URL_SAFE_NO_PAD: Self = Self { kind: Base64Kind::UrlSafe, padding: false, }
URL-safe charset without padding.
sourcepub const fn encoded_length(&self, n: usize) -> usize
pub const fn encoded_length(&self, n: usize) -> usize
Calcuates the encoding length.
Panics
This function panics if any of the conditions below is not satisfied:
n <= isize::MAX
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Base64
impl Send for Base64
impl Sync for Base64
impl Unpin for Base64
impl UnwindSafe for Base64
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more