[−][src]Struct full_moon::tokenizer::Token
Methods
impl<'a> Token<'a>
[src]
pub fn start_position(&self) -> Position
[src]
The position a token begins at
pub fn end_position(&self) -> Position
[src]
The position a token ends at
pub fn token_type(&self) -> AtomicRef<TokenType<'a>>
[src]
The type of token as well as the data needed to represent it
If you don't need any other information, use token_kind
instead.
pub fn token_kind(&self) -> TokenKind
[src]
The kind of token with no additional data.
If you need any information such as idenitfier names, use token_type
instead.
Trait Implementations
impl<'_> Owned for Token<'_>
[src]
type Owned = Token<'static>
What an owned version of the object looks like. Usually contains a 'static
lifetime.
fn owned(&self) -> Self::Owned
[src]
impl<'a> Node for Token<'a>
[src]
fn start_position(&self) -> Option<Position>
[src]
fn end_position(&self) -> Option<Position>
[src]
fn range(&self) -> Option<(Position, Position)>
[src]
fn surrounding_ignore_tokens<'ast>(
&self,
ast: &'ast Ast<'ast>
) -> Option<(Vec<&Token<'ast>>, Vec<&Token<'ast>>)>
[src]
&self,
ast: &'ast Ast<'ast>
) -> Option<(Vec<&Token<'ast>>, Vec<&Token<'ast>>)>
impl<'a> Eq for Token<'a>
[src]
impl<'a> Clone for Token<'a>
[src]
impl<'a> PartialOrd<Token<'a>> for Token<'a>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a> Ord for Token<'a>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a> PartialEq<Token<'a>> for Token<'a>
[src]
impl<'a> Display for Token<'a>
[src]
impl<'a> Debug for Token<'a>
[src]
impl<'a, '_> Borrow<Token<'a>> for &'_ TokenReference<'a>
[src]
impl<'a> Serialize for Token<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de: 'a, 'a> Deserialize<'de> for Token<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<'a> Unpin for Token<'a>
impl<'a> Sync for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> !UnwindSafe for Token<'a>
impl<'a> !RefUnwindSafe for Token<'a>
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,