pub enum Token {
OneByte(u8),
TwoByte(u8, u8),
}
Variants§
Implementations§
Source§impl Token
impl Token
pub fn is_eol(&self) -> bool
pub fn is_numeric(&self) -> bool
pub fn is_alphanumeric(&self) -> bool
Sourcepub fn byte(&self) -> u8
pub fn byte(&self) -> u8
Returns the least-significant byte in the token. For one-byte tokens this is the whole token, but for two-byte tokens this is the second byte.
pub fn string_escaped(&self) -> String
Trait Implementations§
Source§impl Ord for Token
impl Ord for Token
Source§impl PartialOrd for Token
impl PartialOrd for Token
impl Copy for Token
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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