Struct Alphabet
struct Alphabet { ... }
An alphabet defines the 64 ASCII characters (symbols) used for base64.
Common alphabets are provided as constants, and custom alphabets
can be made via from_str or the TryFrom<str> implementation.
Examples
Building and using a custom Alphabet:
let custom = new.unwrap;
let engine = new;
Building a const:
use Alphabet;
static CUSTOM: Alphabet = ;
Building lazily:
use ;
use Lazy;
static CUSTOM: = new;
Implementations
impl Alphabet
const fn new(alphabet: &str) -> Result<Self, ParseAlphabetError>Create an
Alphabetfrom a string of 64 unique printable ASCII bytes.The
=byte is not allowed as it is used for padding.fn as_str(self: &Self) -> &strCreate a
&strfrom the symbols in theAlphabet
impl Clone for Alphabet
fn clone(self: &Self) -> Alphabet
impl Debug for Alphabet
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Eq for Alphabet
impl Freeze for Alphabet
impl PartialEq for Alphabet
fn eq(self: &Self, other: &Alphabet) -> bool
impl RefUnwindSafe for Alphabet
impl Send for Alphabet
impl StructuralPartialEq for Alphabet
impl Sync for Alphabet
impl TryFrom for Alphabet
fn try_from(value: &str) -> Result<Self, <Self as >::Error>
impl Unpin for Alphabet
impl UnwindSafe for Alphabet
impl<T> Any for Alphabet
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Alphabet
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Alphabet
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Alphabet
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Alphabet
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Alphabet
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Alphabet
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Alphabet
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Alphabet
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>