pub struct LexAction<'s, TokenType> {
pub token: &'s str,
pub action: fn(&str) -> TokenType,
}Expand description
Represents a Lexer Action mapping a regex representation to a TokenType
Fields§
§token: &'s strRegex representation of a token
action: fn(&str) -> TokenTypeFunction converting a &str token to a TokenType
Trait Implementations§
Auto Trait Implementations§
impl<'s, TokenType> Freeze for LexAction<'s, TokenType>
impl<'s, TokenType> RefUnwindSafe for LexAction<'s, TokenType>
impl<'s, TokenType> Send for LexAction<'s, TokenType>
impl<'s, TokenType> Sync for LexAction<'s, TokenType>
impl<'s, TokenType> Unpin for LexAction<'s, TokenType>
impl<'s, TokenType> UnwindSafe for LexAction<'s, TokenType>
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