pub enum Character {
Symbol {
value: usize,
},
Padding,
Ignored,
Invalid,
}Expand description
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
A symbol
Padding
A padding character
Ignored
An ignored character
Invalid
An invalid character
Implementations§
Source§impl Character
impl Character
Sourcepub fn is_symbol(self) -> Option<usize>
pub fn is_symbol(self) -> Option<usize>
Returns whether the character is a symbol
If the character is a symbol, its value is returned.
Sourcepub fn is_padding(self) -> bool
pub fn is_padding(self) -> bool
Returns whether the character is padding
Sourcepub fn is_ignored(self) -> bool
pub fn is_ignored(self) -> bool
Returns whether the character is ignored
Sourcepub fn is_invalid(self) -> bool
pub fn is_invalid(self) -> bool
Returns whether the character is invalid
Trait Implementations§
impl Copy for Character
impl Eq for Character
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§
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