[−][src]Struct syntax_pos::symbol::Ident
Fields
name: Symbol
span: Span
Methods
impl Ident
[src]
pub const fn new(name: Symbol, span: Span) -> Ident
[src]
pub const fn with_empty_ctxt(name: Symbol) -> Ident
[src]
pub fn from_interned_str(string: InternedString) -> Ident
[src]
Maps an interned string to an identifier with an empty syntax context.
pub fn from_str(string: &str) -> Ident
[src]
Maps a string to an identifier with an empty syntax context.
pub fn with_span_pos(self, span: Span) -> Ident
[src]
Replaces lo
and hi
with those from span
, but keep hygiene context.
pub fn without_first_quote(self) -> Ident
[src]
pub fn modern(self) -> Ident
[src]
"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]
"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_if_underscore(self) -> Ident
[src]
pub fn as_str(self) -> LocalInternedString
[src]
pub fn as_interned_str(self) -> InternedString
[src]
impl Ident
[src]
pub fn is_special(self) -> bool
[src]
pub fn is_used_keyword(self) -> bool
[src]
Returns true
if the token is a keyword used in the language.
pub fn is_unused_keyword(self) -> bool
[src]
Returns true
if the token is a keyword reserved for possible future use.
pub fn is_reserved(self) -> bool
[src]
Returns true
if the token is either a special identifier or a keyword.
pub fn is_path_segment_keyword(self) -> bool
[src]
A keyword or reserved identifier that can be used as a path segment.
pub fn can_be_raw(self) -> bool
[src]
This identifier can be a raw identifier.
pub fn is_raw_guess(self) -> bool
[src]
We see this identifier in a normal identifier position, like variable name or a type. How was it written originally? Did it use the raw form? Let's try to guess.
Trait Implementations
impl Copy for Ident
[src]
impl Eq for Ident
[src]
impl Clone for Ident
[src]
fn clone(&self) -> Ident
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Ident> for Ident
[src]
fn eq(&self, rhs: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Display for Ident
[src]
impl Debug for Ident
[src]
impl Hash for Ident
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Encodable for Ident
[src]
impl Decodable for Ident
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized,
[src]
T: UseSpecializedEncodable + ?Sized,
impl<T> Decodable for T where
T: UseSpecializedDecodable,
[src]
T: UseSpecializedDecodable,
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T> Erased for T
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,