pub struct Ident { /* private fields */ }Expand description
A Rust identifier token, including its source span and raw-identifier form.
Implementations§
Source§impl Ident
impl Ident
pub fn new(text: impl Display) -> Self
pub fn lex(input: impl Display) -> Result<Self, LexError>
pub fn with_span(self, span: Span) -> Self
pub fn text(&self) -> &str
pub fn is_raw(&self) -> bool
pub fn span(&self) -> Span
pub fn set_span(&mut self, span: Span)
pub fn to_lowercase(self) -> Self
pub fn to_uppercase(self) -> Self
pub fn to_token_tree(&self) -> TokenTree
pub fn into_token_tree(self) -> TokenTree
Trait Implementations§
impl Eq for Ident
impl StructuralPartialEq for Ident
Auto Trait Implementations§
impl !Send for Ident
impl !Sync for Ident
impl Freeze for Ident
impl RefUnwindSafe 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