pub struct Token<'t, K> {
pub kind: K,
pub span: Range<usize>,
pub text: &'t str,
}
Expand description
A token returned by the lexer.
Fields§
§kind: K
§span: Range<usize>
§text: &'t str
Trait Implementations§
impl<'t, K: Eq> Eq for Token<'t, K>
impl<'t, K> StructuralPartialEq for Token<'t, K>
Auto Trait Implementations§
impl<'t, K> Freeze for Token<'t, K>where
K: Freeze,
impl<'t, K> RefUnwindSafe for Token<'t, K>where
K: RefUnwindSafe,
impl<'t, K> Send for Token<'t, K>where
K: Send,
impl<'t, K> Sync for Token<'t, K>where
K: Sync,
impl<'t, K> Unpin for Token<'t, K>where
K: Unpin,
impl<'t, K> UnwindSafe for Token<'t, K>where
K: 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