pub struct Ident {
pub name: Symbol,
pub span: Span,
}Fields§
§name: Symbol§span: SpanImplementations§
Source§impl Ident
impl Ident
Sourcepub const fn new(name: Symbol, span: Span) -> Self
pub const fn new(name: Symbol, span: Span) -> Self
Constructs a new identifier from a symbol and a span.
pub const fn empty() -> Self
pub const fn spanned_empty(span: Span) -> Self
Sourcepub fn from_str_and_span(string: &str, span: Span) -> Self
pub fn from_str_and_span(string: &str, span: Span) -> Self
Maps a string and a span to an identifier.
pub fn without_first_quote(self) -> Self
Trait Implementations§
impl Copy for Ident
impl Eq 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 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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.