pub enum Token<T> {
Literal {
symbol: T,
},
Reference {
length: u32,
distance: u32,
},
}Expand description
An LZ77 token: either a literal symbol or a back-reference into the sliding window.
Variants§
Literal
A single uncompressed symbol.
Fields
§
symbol: TReference
A back-reference copying length symbols from distance positions back in the window.
Trait Implementations§
Source§impl<T: Ord> Ord for Token<T>
impl<T: Ord> Ord for Token<T>
Source§impl<T: PartialOrd> PartialOrd for Token<T>
impl<T: PartialOrd> PartialOrd for Token<T>
impl<T: Copy> Copy for Token<T>
impl<T: Eq> Eq for Token<T>
impl<T> StructuralPartialEq for Token<T>
Auto Trait Implementations§
impl<T> Freeze for Token<T>where
T: Freeze,
impl<T> RefUnwindSafe for Token<T>where
T: RefUnwindSafe,
impl<T> Send for Token<T>where
T: Send,
impl<T> Sync for Token<T>where
T: Sync,
impl<T> Unpin for Token<T>where
T: Unpin,
impl<T> UnsafeUnpin for Token<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Token<T>where
T: UnwindSafe,
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.