Enum Character
pub enum Character
Interpretation of a byte for decoding purposes
For a given encoding, a byte can either be a symbol of that encoding (with a value within the number of symbols of that encoding), a padding character, an ignored character, or an invalid character.
Variants
-
Symbol { value: usize } A symbol
-
Padding A padding character
-
Ignored An ignored character
-
Invalid An invalid character
Implementations
impl Character
fn is_symbol(self) -> Option<usize>Returns whether the character is a symbol
If the character is a symbol, its value is returned.
fn is_padding(self) -> boolReturns whether the character is padding
fn is_ignored(self) -> boolReturns whether the character is ignored
fn is_invalid(self) -> boolReturns whether the character is invalid
Trait Implementations
impl Clone for Character
fn clone(&self) -> Character
impl Copy for Character
impl Debug for Character
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Character
impl PartialEq for Character
fn eq(&self, other: &Character) -> bool
impl StructuralPartialEq for Character
Auto Trait Implementations
impl Freeze for Character
impl RefUnwindSafe for Character
impl Send for Character
impl Sync for Character
impl Unpin for Character
impl UnsafeUnpin for Character
impl UnwindSafe for Character
Blanket Implementations
impl<T> Any for Character
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Character
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Character
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Character
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Character
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Character
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Character
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Character
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Character
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>