pub struct Token<'tu> { /* private fields */ }
Expand description
A lexed piece of a source file.
Implementations
sourceimpl<'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> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more