pub struct Token<'a> {
pub kind: TokenKind,
pub begin: usize,
pub end: usize,
pub text: &'a [u8],
}Expand description
A token of the input: its kind and the byte range it covers.
Fields§
§kind: TokenKindThe token’s kind.
begin: usizeByte offset into the input where the token starts.
end: usizeByte offset into the input where the token ends (exclusive).
text: &'a [u8]The bytes of the input the token covers.
Implementations§
Trait Implementations§
impl<'a> Copy for Token<'a>
impl<'a> Eq for Token<'a>
impl<'a> StructuralPartialEq for Token<'a>
Auto Trait Implementations§
impl<'a> Freeze for Token<'a>
impl<'a> RefUnwindSafe for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> Sync for Token<'a>
impl<'a> Unpin for Token<'a>
impl<'a> UnsafeUnpin for Token<'a>
impl<'a> UnwindSafe for Token<'a>
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