pub struct Token {
pub offset_from: usize,
pub offset_to: usize,
pub position: usize,
pub text: String,
pub position_length: usize,
}Expand description
Token emitted by a tokenizer.
Fields§
§offset_from: usizeByte offset of the first character.
offset_to: usizeByte offset after the last character.
position: usizeLogical token position.
text: StringToken text.
position_length: usizePosition length measured in original tokens.
Implementations§
Trait Implementations§
impl Eq for Token
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 UnsafeUnpin 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