pub struct Node<K, V> {
pub bitmap: SmallBitmap,
pub children: Box<[Arc<Entry<K, V>>]>,
}
Expand description
Node of the Hash Array Mapped Trie
The bitmap is indexed by a HashSubgroup and give an entry
Fields§
§bitmap: SmallBitmap
§children: Box<[Arc<Entry<K, V>>]>
Implementations§
source§impl<K, V> Node<K, V>
impl<K, V> Node<K, V>
pub fn new() -> Self
pub fn singleton(idx: LevelIndex, child: Arc<Entry<K, V>>) -> Self
pub fn is_empty(&self) -> bool
pub fn number_children(&self) -> usize
pub fn get_child(&self, at: ArrayIndex) -> &Arc<Entry<K, V>>
pub fn set_at(&self, idx: LevelIndex, child: Arc<Entry<K, V>>) -> Self
pub fn clear_at(&self, idx: LevelIndex) -> Option<Self>
pub fn replace_at(&self, idx: ArrayIndex, child: Arc<Entry<K, V>>) -> Self
pub fn clear_or_replace_at( &self, idx: LevelIndex, child: Option<Arc<Entry<K, V>>> ) -> Option<Self>
pub fn iter(&self) -> Iter<'_, Arc<Entry<K, V>>>
Trait Implementations§
Auto Trait Implementations§
impl<K, V> RefUnwindSafe for Node<K, V>where K: RefUnwindSafe, V: RefUnwindSafe,
impl<K, V> Send for Node<K, V>where K: Send + Sync, V: Send + Sync,
impl<K, V> Sync for Node<K, V>where K: Send + Sync, V: Send + Sync,
impl<K, V> Unpin for Node<K, V>
impl<K, V> UnwindSafe for Node<K, V>where K: RefUnwindSafe, V: RefUnwindSafe,
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