[−][src]Enum syntex_syntax2::parse::token::Token
Variants
Eq
Lt
Le
EqEq
Ne
Ge
Gt
AndAnd
OrOr
Not
Tilde
BinOp(BinOpToken)
BinOpEq(BinOpToken)
At
Dot
DotDot
DotDotDot
Comma
Semi
Colon
ModSep
RArrow
LArrow
FatArrow
Pound
Dollar
Question
OpenDelim(DelimToken)
An opening delimiter, eg. {
CloseDelim(DelimToken)
A closing delimiter, eg. }
Literal(Lit, Option<Name>)
Ident(Ident)
Underscore
Lifetime(Ident)
Interpolated(Rc<Nonterminal>)
DocComment(Name)
Doc comment
SubstNt(Ident)
A syntactic variable that will be filled in by macro expansion.
Whitespace
Whitespace
Comment
Comment
Shebang(Name)
Eof
Methods
impl Token
[src]
pub fn is_like_gt(&self) -> bool
[src]
Returns true
if the token starts with '>'.
pub fn can_begin_expr(&self) -> bool
[src]
Returns true
if the token can appear at the start of an expression.
pub fn can_begin_type(&self) -> bool
[src]
Returns true
if the token can appear at the start of a type.
pub fn is_lit(&self) -> bool
[src]
Returns true
if the token is any literal
pub fn ident(&self) -> Option<Ident>
[src]
pub fn is_ident(&self) -> bool
[src]
Returns true
if the token is an identifier.
pub fn is_doc_comment(&self) -> bool
[src]
Returns true
if the token is a documentation comment.
pub fn is_interpolated(&self) -> bool
[src]
Returns true
if the token is interpolated.
pub fn is_path(&self) -> bool
[src]
Returns true
if the token is an interpolated path.
pub fn is_lifetime(&self) -> bool
[src]
Returns true
if the token is a lifetime.
pub fn is_mutability(&self) -> bool
[src]
Returns true
if the token is either the mut
or const
keyword.
pub fn is_qpath_start(&self) -> bool
[src]
pub fn is_path_start(&self) -> bool
[src]
pub fn is_keyword(&self, kw: Keyword) -> bool
[src]
Returns true
if the token is a given keyword, kw
.
pub fn is_path_segment_keyword(&self) -> bool
[src]
pub fn is_any_keyword(&self) -> bool
[src]
Returns true
if the token is either a strict or reserved keyword.
pub fn is_strict_keyword(&self) -> bool
[src]
Returns true
if the token is a strict keyword.
pub fn is_reserved_keyword(&self) -> bool
[src]
Returns true
if the token is a keyword reserved for possible future use.
Trait Implementations
impl Eq for Token
[src]
impl PartialEq<Token> for Token
[src]
impl From<Token> for TokenStream
[src]
fn from(token: Token) -> TokenStream
[src]
impl Clone for Token
[src]
fn clone(&self) -> Token
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for Token
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Token
[src]
impl Serialize for Token
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Token
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl !Sync for Token
impl !Send for Token
impl Unpin for Token
impl !RefUnwindSafe for Token
impl !UnwindSafe for Token
Blanket Implementations
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>,