#[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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)