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

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

fn with_empty_ctxt(name: Name) -> Ident

Trait Implementations

impl PartialEq for Ident

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

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

impl Hash for Ident

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

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

impl Debug for Ident

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

impl Display for Ident

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

impl Encodable for Ident

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

impl Decodable for Ident

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

impl ToTokens for Ident

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

Derived Implementations

impl Eq for Ident

impl Copy for Ident

impl Clone for Ident

fn clone(&self) -> Ident

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