Struct syntax::ast::Ident[][src]

pub struct Ident {
    pub name: Symbol,
    pub span: Span,
}

Fields

Methods

impl Ident
[src]

Maps an interned string to an identifier with an empty syntax context.

Maps a string to an identifier with an empty syntax context.

Replace lo and hi with those from span, but keep hygiene context.

"Normalize" ident for use in comparisons using "item hygiene". Identifiers with same string value become same if they came from the same "modern" macro (e.g. macro item, but not macro_rules item) and stay different if they came from different "modern" macros. Technically, this operation strips all non-opaque marks from ident's syntactic context.

"Normalize" ident for use in comparisons using "local variable hygiene". Identifiers with same string value become same if they came from the same non-transparent macro (e.g. macro or macro_rules! items) and stay different if they came from different non-transparent macros. Technically, this operation strips all transparent marks from ident's syntactic context.

impl Ident
[src]

Returns true if the token is a keyword used in the language.

Returns true if the token is a keyword reserved for possible future use.

Returns true if the token is either a special identifier or a keyword.

A keyword or reserved identifier that can be used as a path segment.

Trait Implementations

impl Hash for Ident
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Ident
[src]

Formats the value using the given formatter. Read more

impl Clone for Ident
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Decodable for Ident
[src]

impl Debug for Ident
[src]

Formats the value using the given formatter. Read more

impl Copy for Ident
[src]

impl Eq for Ident
[src]

impl Encodable for Ident
[src]

impl PartialEq<Ident> for Ident
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl ToTokens for Ident
[src]

Important traits for Vec<u8>

Auto Trait Implementations

impl !Send for Ident

impl !Sync for Ident