pub struct Token {
pub token_type: TokenType,
pub span: Span,
}Expand description
Contains a token type and the portion of the text defining the token.
Fields§
§token_type: TokenTypeThe type held within the token.
span: SpanThe location within the source string.
Implementations§
Trait Implementations§
impl Copy for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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