Struct Symbol

pub struct Symbol(/* private field */);

An ASCII printable byte suitable for use as a base64 symbol in an alphabet or as custom padding.

This doesn't mean that a particular symbol is used in any particular alphabet, just that it could be used in one.

Implementations

impl Symbol

const fn new(symbol: u8) -> Option<Self>

Returns Some if symbol is a valid printable ASCII symbol, otherwise None.

const fn as_u8(&self) -> u8

Returns the symbol as an ASCII byte.

fn as_char(&self) -> char

Returns the symbol as a char.

Trait Implementations

impl Clone for Symbol

fn clone(&self) -> Symbol

impl Copy for Symbol

impl Debug for Symbol

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for Symbol

impl PartialEq for Symbol

fn eq(&self, other: &Symbol) -> bool

impl StructuralPartialEq for Symbol

Auto Trait Implementations

impl Freeze for Symbol

impl RefUnwindSafe for Symbol

impl Send for Symbol

impl Sync for Symbol

impl Unpin for Symbol

impl UnsafeUnpin for Symbol

impl UnwindSafe for Symbol

Blanket Implementations

impl<T> Any for Symbol where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Symbol where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Symbol where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Symbol where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Symbol

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Symbol where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Symbol where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Symbol where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Symbol where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>