pub struct LeafNode<K, V> { /* private fields */ }
Implementations§
Source§impl<K: Key, V> LeafNode<K, V>
impl<K: Key, V> LeafNode<K, V>
pub fn new() -> Box<Self>
pub fn len(&self) -> usize
Sourcepub const fn max_capacity() -> u16
pub const fn max_capacity() -> u16
Returns the maximum capacity of the leaf node
pub fn is_full(&self) -> bool
pub fn able_to_lend(&self) -> bool
pub fn in_range<Q>(&self, k: &Q) -> bool
pub fn key_range(&self) -> (Option<K>, Option<K>)
pub fn is_size_minimum(&self) -> bool
pub fn set_prev(&mut self, id: Option<LeafNodeId>)
pub fn prev(&self) -> Option<LeafNodeId>
pub fn set_next(&mut self, id: Option<LeafNodeId>)
pub fn next(&self) -> Option<LeafNodeId>
pub fn set_data(&mut self, data: impl Iterator<Item = (K, V)>)
pub fn data_at(&self, slot: usize) -> (&K, &V)
Sourcepub fn value_at_mut(&mut self, slot: usize) -> &mut V
pub fn value_at_mut(&mut self, slot: usize) -> &mut V
Get mut ref for value at slot
pub fn try_data_at(&self, idx: usize) -> Option<(&K, &V)>
pub fn locate_slot<Q>(&self, k: &Q) -> Result<usize, usize>
pub fn locate_slot_with_value<Q>(&self, k: &Q) -> (usize, Option<&V>)
Sourcepub unsafe fn take_data(&mut self, slot: usize) -> (K, V)
pub unsafe fn take_data(&mut self, slot: usize) -> (K, V)
This should never called with same slot
pub fn keys(&self) -> &[K]
pub fn values(&self) -> &[V]
Trait Implementations§
Auto Trait Implementations§
impl<K, V> Freeze for LeafNode<K, V>
impl<K, V> RefUnwindSafe for LeafNode<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for LeafNode<K, V>
impl<K, V> Sync for LeafNode<K, V>
impl<K, V> Unpin for LeafNode<K, V>
impl<K, V> UnwindSafe for LeafNode<K, V>where
K: UnwindSafe,
V: 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