pub struct FixedLenNode<PTR: TrieIndex> {
pub children: [PTR; 16],
pub prefix_len: u16,
pub leaf_mask: u16,
pub leaf: PTR,
pub flags: u8,
}Expand description
A single node in the fixed-length nibble trie arena.
Generic over PTR (pointer/index type for children and arena references).
Unlike Node, there is no LEN parameter (prefix_len is always u16)
and no offset field (computed from leaf * max_len).
Layout with PTR=u16: 40 bytes (saves 8 vs NibbleTrie’s 48). Layout with PTR=u32: 76 bytes (saves 4 vs NibbleTrie’s 80).
Fields§
§children: [PTR; 16]§prefix_len: u16§leaf_mask: u16§leaf: PTR§flags: u8Implementations§
Source§impl<PTR: TrieIndex> FixedLenNode<PTR>
impl<PTR: TrieIndex> FixedLenNode<PTR>
pub fn is_terminal(&self) -> bool
pub fn is_leaf(&self, nib: usize) -> bool
Sourcepub fn children_mask(&self) -> u16
pub fn children_mask(&self) -> u16
Compute a 16-bit mask where bit N is set if children[N] is occupied
(either leaf or internal — not the empty sentinel).
Trait Implementations§
Source§impl<PTR: Clone + TrieIndex> Clone for FixedLenNode<PTR>
impl<PTR: Clone + TrieIndex> Clone for FixedLenNode<PTR>
Source§fn clone(&self) -> FixedLenNode<PTR>
fn clone(&self) -> FixedLenNode<PTR>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<PTR: Copy + TrieIndex> Copy for FixedLenNode<PTR>
Auto Trait Implementations§
impl<PTR> Freeze for FixedLenNode<PTR>where
PTR: Freeze,
impl<PTR> RefUnwindSafe for FixedLenNode<PTR>where
PTR: RefUnwindSafe,
impl<PTR> Send for FixedLenNode<PTR>where
PTR: Send,
impl<PTR> Sync for FixedLenNode<PTR>where
PTR: Sync,
impl<PTR> Unpin for FixedLenNode<PTR>where
PTR: Unpin,
impl<PTR> UnsafeUnpin for FixedLenNode<PTR>where
PTR: UnsafeUnpin,
impl<PTR> UnwindSafe for FixedLenNode<PTR>where
PTR: 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