pub enum CharClass {
Alpha,
Digit,
AlphaNum,
Whitespace,
Exact(char),
OneOf(Vec<char>),
NoneOf(Vec<char>),
}Expand description
A simple character class for lexer rules.
Variants§
Alpha
Matches any ASCII letter
Digit
Matches any ASCII digit
AlphaNum
Matches any ASCII alphanumeric
Whitespace
Matches whitespace
Exact(char)
Matches a specific character
OneOf(Vec<char>)
Matches any character in a set
NoneOf(Vec<char>)
Matches any character not in a set
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CharClass
impl RefUnwindSafe for CharClass
impl Send for CharClass
impl Sync for CharClass
impl Unpin for CharClass
impl UnsafeUnpin for CharClass
impl UnwindSafe for CharClass
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