Struct syntax::ast::Ident [−][src]
Fields
name: Symbol
span: Span
Methods
impl Ident
[src]
impl Ident
pub const fn new(name: Symbol, span: Span) -> Ident
[src]
pub const fn new(name: Symbol, span: Span) -> Ident
pub const fn with_empty_ctxt(name: Symbol) -> Ident
[src]
pub const fn with_empty_ctxt(name: Symbol) -> Ident
pub fn from_interned_str(string: InternedString) -> Ident
[src]
pub fn from_interned_str(string: InternedString) -> Ident
Maps an interned string to an identifier with an empty syntax context.
pub fn from_str(string: &str) -> Ident
[src]
pub fn from_str(string: &str) -> Ident
Maps a string to an identifier with an empty syntax context.
pub fn with_span_pos(self, span: Span) -> Ident
[src]
pub fn with_span_pos(self, span: Span) -> Ident
Replace lo
and hi
with those from span
, but keep hygiene context.
pub fn without_first_quote(self) -> Ident
[src]
pub fn without_first_quote(self) -> Ident
pub fn modern(self) -> Ident
[src]
pub fn modern(self) -> Ident
pub fn gensym(self) -> Ident
[src]
pub fn gensym(self) -> Ident
pub fn as_str(self) -> LocalInternedString
[src]
pub fn as_str(self) -> LocalInternedString
impl Ident
[src]
impl Ident
pub fn is_special(self) -> bool
[src]
pub fn is_special(self) -> bool
pub fn is_used_keyword(self) -> bool
[src]
pub fn is_used_keyword(self) -> bool
Returns true
if the token is a keyword used in the language.
pub fn is_unused_keyword(self) -> bool
[src]
pub fn is_unused_keyword(self) -> bool
Returns true
if the token is a keyword reserved for possible future use.
pub fn is_reserved(self) -> bool
[src]
pub fn is_reserved(self) -> bool
Returns true
if the token is either a special identifier or a keyword.
pub fn is_path_segment_keyword(self) -> bool
[src]
pub fn is_path_segment_keyword(self) -> bool
A keyword or reserved identifier that can be used as a path segment.
pub fn is_raw_guess(self) -> bool
[src]
pub fn is_raw_guess(self) -> bool
Trait Implementations
impl Hash for Ident
[src]
impl Hash for Ident
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Decodable for Ident
[src]
impl Decodable for Ident
impl Clone for Ident
[src]
impl Clone for Ident
fn clone(&self) -> Ident
[src]
fn clone(&self) -> Ident
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Display for Ident
[src]
impl Display for Ident
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Debug for Ident
[src]
impl Debug for Ident
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Copy for Ident
[src]
impl Copy for Ident
impl Eq for Ident
[src]
impl Eq for Ident
impl PartialEq<Ident> for Ident
[src]
impl PartialEq<Ident> for Ident
fn eq(&self, rhs: &Ident) -> bool
[src]
fn eq(&self, rhs: &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[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Encodable for Ident
[src]
impl Encodable for Ident
impl ToTokens for Ident
[src]
impl ToTokens for Ident