pub struct Ident {
pub name: NameAtom,
pub span: Span,
}Expand description
An identifier with its source span.
Fields§
§name: NameAtom§span: SpanImplementations§
Source§impl Ident
impl Ident
Sourcepub fn into_spanned<T: From<NameAtom>>(self) -> Spanned<T>
pub fn into_spanned<T: From<NameAtom>>(self) -> Spanned<T>
Convert this identifier into a Spanned<T>, consuming the name and span.
Sourcepub fn as_generic_param_name(&self) -> GenericParamName
pub fn as_generic_param_name(&self) -> GenericParamName
Interpret this identifier as a generic parameter name.
Trait Implementations§
impl Eq for Ident
Source§impl FormatEquivalent for Ident
impl FormatEquivalent for Ident
Source§fn format_equivalent(&self, other: &Self) -> bool
fn format_equivalent(&self, other: &Self) -> bool
Returns
true if self and other are equivalent up to formatting.impl StructuralPartialEq for Ident
Auto Trait Implementations§
impl Freeze for Ident
impl RefUnwindSafe for Ident
impl Send for Ident
impl Sync for Ident
impl Unpin for Ident
impl UnsafeUnpin for Ident
impl UnwindSafe for Ident
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.