[−][src]Struct sourcemap::Token
Represents a token from a sourcemap
Implementations
impl<'a> Token<'a>
[src]
pub fn get_dst_line(&self) -> u32
[src]
get the destination (minified) line number
pub fn get_dst_col(&self) -> u32
[src]
get the destination (minified) column number
pub fn get_dst(&self) -> (u32, u32)
[src]
get the destination line and column
pub fn get_src_line(&self) -> u32
[src]
get the source line number
pub fn get_src_col(&self) -> u32
[src]
get the source column number
pub fn get_src(&self) -> (u32, u32)
[src]
get the source line and column
pub fn get_src_id(&self) -> u32
[src]
Return the source ID of the token
pub fn get_source(&self) -> Option<&'a str>
[src]
get the source if it exists as string
pub fn has_source(&self) -> bool
[src]
Is there a source for this token?
pub fn get_name(&self) -> Option<&'a str>
[src]
get the name if it exists as string
pub fn has_name(&self) -> bool
[src]
returns true
if a name exists, false
otherwise
pub fn get_name_id(&self) -> u32
[src]
Return the name ID of the token
pub fn to_tuple(&self) -> (&'a str, u32, u32, Option<&'a str>)
[src]
Converts the token into a debug tuple in the form
(source, src_line, src_col, name)
pub fn get_raw_token(&self) -> RawToken
[src]
Get the underlying raw token
pub fn get_source_view(&self) -> Option<&SourceView>
[src]
Returns the referenced source view.
Trait Implementations
impl<'a> Clone for Token<'a>
[src]
impl<'a> Copy for Token<'a>
[src]
impl<'a> Debug for Token<'a>
[src]
impl<'a> Display for Token<'a>
[src]
impl<'a> Eq for Token<'a>
[src]
impl<'a> Ord for Token<'a>
[src]
fn cmp(&self, other: &Token) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a> PartialEq<Token<'a>> for Token<'a>
[src]
impl<'a> PartialOrd<Token<'a>> for Token<'a>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Token<'a>
impl<'a> !Send for Token<'a>
impl<'a> !Sync for Token<'a>
impl<'a> Unpin for Token<'a>
impl<'a> !UnwindSafe for Token<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,