pub struct TokenOffset {
pub start: u32,
pub end: u32,
}Expand description
The byte range a token came from, into the analyzed text.
Fields§
§start: u32Inclusive start byte offset.
end: u32Exclusive end byte offset.
Implementations§
Trait Implementations§
Source§impl Clone for TokenOffset
impl Clone for TokenOffset
impl Copy for TokenOffset
Source§impl Debug for TokenOffset
impl Debug for TokenOffset
impl Eq for TokenOffset
Source§impl Hash for TokenOffset
impl Hash for TokenOffset
Source§impl Ord for TokenOffset
impl Ord for TokenOffset
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for TokenOffset
impl PartialEq for TokenOffset
Source§impl PartialOrd for TokenOffset
impl PartialOrd for TokenOffset
impl StructuralPartialEq for TokenOffset
Auto Trait Implementations§
impl Freeze for TokenOffset
impl RefUnwindSafe for TokenOffset
impl Send for TokenOffset
impl Sync for TokenOffset
impl Unpin for TokenOffset
impl UnsafeUnpin for TokenOffset
impl UnwindSafe for TokenOffset
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