Struct syntax::ast::Ident
[−]
[src]
pub struct Ident {
pub name: Symbol,
pub ctxt: SyntaxContext,
}🔬 This is a nightly-only experimental API. (
rustc_private)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: Symbol
🔬 This is a nightly-only experimental API. (
rustc_private)ctxt: SyntaxContext
🔬 This is a nightly-only experimental API. (
rustc_private)Methods
impl Ident[src]
fn with_empty_ctxt(name: Name) -> Ident
🔬 This is a nightly-only experimental API. (
rustc_private)fn from_str(s: &str) -> Ident
🔬 This is a nightly-only experimental API. (
rustc_private)Maps a string to an identifier with an empty syntax context.
fn unhygienize(&self) -> Ident
🔬 This is a nightly-only experimental API. (
rustc_private)Trait Implementations
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
impl Copy for Ident[src]
impl PartialEq for Ident[src]
fn eq(&self, __arg_0: &Ident) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Ident) -> bool
This method tests for !=.
impl Eq for Ident[src]
impl Hash for Ident[src]
fn hash<__H: Hasher>(&self, __arg_0: &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: Hasher1.3.0
Feeds a slice of this type into the state provided.
impl Debug for Ident[src]
impl Display for Ident[src]
impl Encodable for Ident[src]
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>
🔬 This is a nightly-only experimental API. (rustc_private)
deprecated in favor of rustc-serialize on crates.io
impl Decodable for Ident[src]
fn decode<D: Decoder>(d: &mut D) -> Result<Ident, D::Error>
🔬 This is a nightly-only experimental API. (rustc_private)
deprecated in favor of rustc-serialize on crates.io