#[repr(align(8))]pub struct LeafNode<K, V> {
value: V,
key: K,
}
Expand description
Node that contains a single leaf value.
Fields§
§value: V
The leaf value.
key: K
The full key that the value
was stored with.
Implementations§
source§impl<K, V> LeafNode<K, V>
impl<K, V> LeafNode<K, V>
sourcepub fn value_ref(&self) -> &V
pub fn value_ref(&self) -> &V
Returns a shared reference to the value contained by this leaf node
sourcepub fn value_mut(&mut self) -> &mut V
pub fn value_mut(&mut self) -> &mut V
Returns a mutable reference to the value contained by this leaf node
sourcepub fn entry_ref(&self) -> (&K, &V)
pub fn entry_ref(&self) -> (&K, &V)
Return shared references to the key and value contained by this leaf node
sourcepub fn entry_mut(&mut self) -> (&mut K, &mut V)
pub fn entry_mut(&mut self) -> (&mut K, &mut V)
Return mutable references to the key and value contained by this leaf node
sourcepub fn into_entry(self) -> (K, V)
pub fn into_entry(self) -> (K, V)
Consume the leaf node and return a tuple of the key and value
Trait Implementations§
source§impl<K, T> Visitable<K, T> for LeafNode<K, T>
impl<K, T> Visitable<K, T> for LeafNode<K, T>
impl<K, V> Sealed for LeafNode<K, V>
Auto Trait Implementations§
impl<K, V> RefUnwindSafe for LeafNode<K, V>where K: RefUnwindSafe, V: RefUnwindSafe,
impl<K, V> Send for LeafNode<K, V>where K: Send, V: Send,
impl<K, V> Sync for LeafNode<K, V>where K: Sync, V: Sync,
impl<K, V> Unpin for LeafNode<K, V>where K: Unpin, V: Unpin,
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