#[repr(transparent)]pub struct Token(pub u32);
Available on crate feature
blob
only.Expand description
A token represented as an interned integer.
A token represents the smallest possible unit of change during a diff. For text this is usually a line, a word or a single character. All algorithms operate on interned tokens instead of using the token data directly. This allows for much better performance by amortizing the cost hashing/equality.
While you can intern tokens yourself it is strongly recommended to use InternedInput
module.
Tuple Fields§
§0: u32
Trait Implementations§
impl Copy for Token
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 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