pub struct TokenTree<Span> {
pub kind: TokenTreeKind<Span>,
pub span: Span,
}
Expand description
An untyped tree of tokens.
This type allows the end-user to represent the tokens that is passed in the
macro invocation. It is not exactly the same as proc_macro::TokenTree
,
as the tokens are grouped differently 1. Writing a
“proc_macro::TokenTree
to TokenTree
” should not be too hard, but is
not the scope of this crate.
Fields§
§kind: TokenTreeKind<Span>
What kind of token tree is this?
span: Span
Its position in the input code (useful for error message generation).
Trait Implementations§
impl<Span> StructuralPartialEq for TokenTree<Span>
Auto Trait Implementations§
impl<Span> Freeze for TokenTree<Span>where
Span: Freeze,
impl<Span> RefUnwindSafe for TokenTree<Span>where
Span: RefUnwindSafe,
impl<Span> Send for TokenTree<Span>where
Span: Send,
impl<Span> Sync for TokenTree<Span>where
Span: Sync,
impl<Span> Unpin for TokenTree<Span>where
Span: Unpin,
impl<Span> UnwindSafe for TokenTree<Span>where
Span: UnwindSafe,
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