pub struct Token<'tu> { /* private fields */ }
Expand description
A lexed piece of a source file.
Implementations§
Source§impl<'tu> Token<'tu>
impl<'tu> Token<'tu>
Sourcepub fn get_spelling(&self) -> String
pub fn get_spelling(&self) -> String
Returns the textual representation of this token.
Sourcepub fn get_location(&self) -> SourceLocation<'tu>
pub fn get_location(&self) -> SourceLocation<'tu>
Returns the source location of this token.
Sourcepub fn get_range(&self) -> SourceRange<'tu>
pub fn get_range(&self) -> SourceRange<'tu>
Returns the source range of this token.
Trait Implementations§
impl<'tu> Copy for Token<'tu>
Auto Trait Implementations§
impl<'tu> Freeze for Token<'tu>
impl<'tu> RefUnwindSafe for Token<'tu>
impl<'tu> !Send for Token<'tu>
impl<'tu> !Sync for Token<'tu>
impl<'tu> Unpin for Token<'tu>
impl<'tu> UnwindSafe for Token<'tu>
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