#[repr(C)]pub struct Token {
pub kind: TokenKind,
pub text_hash: u64,
pub line: u32,
}Expand description
One token of a source file, so never whitespace or a comment.
Fields§
§kind: TokenKindWhether the token is an identifier, a literal, another token, or a token of an import or export declaration.
text_hash: u64The 64-bit FNV-1a hash of the token’s UTF-8 text as written.
line: u32The 1-based line on which the token starts.
Trait Implementations§
impl Copy for Token
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Forget for Token
impl Freeze for Token
impl Move for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin 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