pub struct TokenItem<'s> {
pub token: Token<'s>,
pub close_index: Option<usize>,
}Expand description
A token with attached metadata.
Fields§
§token: Token<'s>The actual token.
close_index: Option<usize>The index of the corresponding closing delimiter token, if this token is an opening delimiter.
§Example
{ some other tokens }
^ open ^ closeIn this example, the opening { token would have a close_index of 5, the index of the
closing delimiter.
Trait Implementations§
impl<'s> StructuralPartialEq for TokenItem<'s>
Auto Trait Implementations§
impl<'s> Freeze for TokenItem<'s>
impl<'s> RefUnwindSafe for TokenItem<'s>
impl<'s> Send for TokenItem<'s>
impl<'s> Sync for TokenItem<'s>
impl<'s> Unpin for TokenItem<'s>
impl<'s> UnwindSafe for TokenItem<'s>
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