pub struct Token<'src> {
pub kind: TokenKind,
pub span: Span,
pub text: &'src str,
}Expand description
A token with its kind, span, and source text slice.
Fields§
§kind: TokenKindThe kind of token.
span: SpanThe span in the source text.
text: &'src strThe source text of this token.
Implementations§
Trait Implementations§
impl<'src> Eq for Token<'src>
impl<'src> StructuralPartialEq for Token<'src>
Auto Trait Implementations§
impl<'src> Freeze for Token<'src>
impl<'src> RefUnwindSafe for Token<'src>
impl<'src> Send for Token<'src>
impl<'src> Sync for Token<'src>
impl<'src> Unpin for Token<'src>
impl<'src> UnwindSafe for Token<'src>
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