pub struct TokenInfo { /* private fields */ }
Expand description
A struct to hold information about the tokens in the tokenized buffer.
Implementations§
Source§impl TokenInfo
impl TokenInfo
Sourcepub fn channel(&self) -> TokenChannel
pub fn channel(&self) -> TokenChannel
Returns the channel of the token.
Sourcepub fn token_type(&self) -> TokenType
pub fn token_type(&self) -> TokenType
Returns the type of the token.
Sourcepub fn byte_offset(&self) -> ByteOffset
pub fn byte_offset(&self) -> ByteOffset
Returns the byte offset of the token, 0-based.
Trait Implementations§
impl Copy for TokenInfo
impl StructuralPartialEq for TokenInfo
Auto Trait Implementations§
impl Freeze for TokenInfo
impl RefUnwindSafe for TokenInfo
impl Send for TokenInfo
impl Sync for TokenInfo
impl Unpin for TokenInfo
impl UnwindSafe for TokenInfo
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