pub struct GreenLeaf<K: Copy> {
    pub kind: K,
    pub length: usize,
}Expand description
A green leaf kind that stores only kind and length.
Green leaves represent individual tokens (keywords, identifiers, literals, etc.) without storing the actual text content. They only store the kind kind and length, avoiding text duplication and enabling efficient sharing.
Fields§
§kind: KThe kind kind/category (e.g., keyword, identifier, literal)
length: usizeThe byte length of the kind text
Implementations§
Trait Implementations§
impl<K: Copy + Copy> Copy for GreenLeaf<K>
impl<K: Eq + Copy> Eq for GreenLeaf<K>
impl<K: Copy> StructuralPartialEq for GreenLeaf<K>
Auto Trait Implementations§
impl<K> Freeze for GreenLeaf<K>where
    K: Freeze,
impl<K> RefUnwindSafe for GreenLeaf<K>where
    K: RefUnwindSafe,
impl<K> Send for GreenLeaf<K>where
    K: Send,
impl<K> Sync for GreenLeaf<K>where
    K: Sync,
impl<K> Unpin for GreenLeaf<K>where
    K: Unpin,
impl<K> UnwindSafe for GreenLeaf<K>where
    K: 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