pub struct TokenImpl<T>where
T: TokenType,{
pub token_type: T,
pub value: String,
pub pos: (usize, usize),
}Expand description
Generic Token implementation
A Token is anything that contains a type, a value, and a position in the input text
Fields§
§token_type: TToken type
value: StringToken value
pos: (usize, usize)Token absolute position in the input text (start, end) - start is inclusive, end is exclusive
Implementations§
Trait Implementations§
impl<T> StructuralPartialEq for TokenImpl<T>where
T: TokenType,
Auto Trait Implementations§
impl<T> Freeze for TokenImpl<T>where
T: Freeze,
impl<T> RefUnwindSafe for TokenImpl<T>where
T: RefUnwindSafe,
impl<T> Send for TokenImpl<T>where
T: Send,
impl<T> Sync for TokenImpl<T>where
T: Sync,
impl<T> Unpin for TokenImpl<T>where
T: Unpin,
impl<T> UnwindSafe for TokenImpl<T>where
T: UnwindSafe,
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