Type Alias Ident

Source
pub type Ident = Ident<SpanData<SyntaxContext>>;

Aliased Type§

struct Ident {
    pub sym: Symbol,
    pub span: SpanData<SyntaxContext>,
    pub is_raw: IdentIsRaw,
}

Fields§

§sym: Symbol§span: SpanData<SyntaxContext>§is_raw: IdentIsRaw

Implementations

§

impl<S> Ident<S>

pub fn new(text: &str, span: S) -> Ident<S>

Trait Implementations

Source§

impl<Span> AsName for Ident<Span>

Source§

fn as_name(&self) -> Name

§

impl<S> Clone for Ident<S>
where S: Clone,

§

fn clone(&self) -> Ident<S>

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
§

impl<S> Debug for Ident<S>
where S: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<S> Display for Ident<S>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<S> Hash for Ident<S>
where S: Hash,

§

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

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

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

Feeds a slice of this type into the given Hasher. Read more
§

impl<S> PartialEq for Ident<S>
where S: PartialEq,

§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToTokenTree for Ident<SpanData<SyntaxContext>>

Source§

fn to_tokens( self, _span: SpanData<SyntaxContext>, builder: &mut TopSubtreeBuilder<SpanData<SyntaxContext>>, )

§

impl<S> Eq for Ident<S>
where S: Eq,

§

impl<S> StructuralPartialEq for Ident<S>