pub struct Token {
pub index: usize,
pub token_type: TokenType,
pub char_interval: CharInterval,
pub first_token_after_newline: bool,
}
Expand description
Represents a token extracted from text
Fields§
§index: usize
The position of the token in the sequence of tokens
token_type: TokenType
The type of the token
char_interval: CharInterval
The character interval within the original text that this token spans
first_token_after_newline: bool
True if the token immediately follows a newline or carriage return
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Token
impl<'de> Deserialize<'de> for Token
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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