Struct syntex_syntax::ast::Ident [] [src]

pub struct Ident {
    pub name: Name,
    pub ctxt: SyntaxContext,
}

An identifier contains a Name (index into the interner table) and a SyntaxContext to track renaming and macro expansion per Flatt et al., "Macros That Work Together"

Fields

name
ctxt

Methods

impl Ident
[src]

fn new(name: Name, ctxt: SyntaxContext) -> Ident

fn with_empty_ctxt(name: Name) -> Ident

Trait Implementations

impl PartialEq for Ident
[src]

fn eq(&self, other: &Ident) -> bool

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

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl Hash for Ident
[src]

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Debug for Ident
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Ident
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Encodable for Ident
[src]

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>

impl Decodable for Ident
[src]

fn decode<D: Decoder>(d: &mut D) -> Result<Ident, D::Error>

impl ToTokens for Ident
[src]

fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree>

Derived Implementations

impl Eq for Ident
[src]

impl Copy for Ident
[src]

impl Clone for Ident
[src]

fn clone(&self) -> Ident

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more