[−][src]Struct syntax::ast::Ident
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
"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.
pub fn modern_and_legacy(self) -> Ident
[src]
pub fn modern_and_legacy(self) -> Ident
"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.
pub fn gensym(self) -> Ident
[src]
pub fn gensym(self) -> Ident
pub fn gensym_if_underscore(self) -> Ident
[src]
pub fn gensym_if_underscore(self) -> Ident
pub fn as_str(self) -> LocalInternedString
[src]
pub fn as_str(self) -> LocalInternedString
pub fn as_interned_str(self) -> InternedString
[src]
pub fn as_interned_str(self) -> InternedString
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 Clone for Ident
[src]
impl Clone for Ident
fn clone(&self) -> Ident
[src]
fn clone(&self) -> Ident
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
impl Decodable for Ident
[src]
impl Decodable for Ident
impl Debug for Ident
[src]
impl Debug for Ident
impl Encodable for Ident
[src]
impl Encodable for Ident
impl Eq for Ident
[src]
impl Eq for Ident
impl Copy for Ident
[src]
impl Copy for Ident
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,
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 PartialEq<Ident> for Ident
[src]
impl PartialEq<Ident> for Ident
fn eq(&self, rhs: &Ident) -> bool
[src]
fn eq(&self, rhs: &Ident) -> bool
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl ToTokens for Ident
[src]
impl ToTokens for Ident
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized,
[src]
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized,
impl<T> Decodable for T where
T: UseSpecializedDecodable,
[src]
impl<T> Decodable for T where
T: UseSpecializedDecodable,
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T
impl<T> Erased for T
impl<T> Erased for T