Struct collections::btree::node::NodeRef
[−]
[src]
pub struct NodeRef<BorrowType, K, V, Type> { height: usize, node: NonZero<*const LeafNode<K, V>>, root: *const Root<K, V>, _marker: PhantomData<(BorrowType, Type)>, }
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
A reference to a node.
This type has a number of paramaters that controls how it acts:
- BorrowType
: This can be Immut<'a>
or Mut<'a>
for some 'a
or Owned
.
When this is Immut<'a>
, the NodeRef
acts roughly like &'a Node
,
when this is Mut<'a>
, the NodeRef
acts roughly like &'a mut Node
,
and when this is Owned
, the NodeRef
acts roughly like Box<Node>
.
- K
and V
: These control what types of things are stored in the nodes.
- Type
: This can be Leaf
, Internal
, or LeafOrInternal
. When this is
Leaf
, the NodeRef
points to a leaf node, when this is Internal
the
NodeRef
points to an internal node, and when this is LeafOrInternal
the
NodeRef
could be pointing to either type of node.
Fields
height | Unstable ( collections #27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead |
node | Unstable ( collections #27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead |
root | Unstable ( collections #27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead |
_marker | Unstable ( collections #27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead |
Methods
impl<BorrowType, K, V> NodeRef<BorrowType, K, V, Internal>
fn as_internal(&self) -> &InternalNode<K, V>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
impl<'a, K, V> NodeRef<Mut<'a>, K, V, Internal>
fn as_internal_mut(&mut self) -> &mut InternalNode<K, V>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
impl<BorrowType, K, V, Type> NodeRef<BorrowType, K, V, Type>
fn len(&self) -> usize
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn forget_type(self) -> NodeRef<BorrowType, K, V, LeafOrInternal>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn reborrow<'a>(&'a self) -> NodeRef<Immut<'a>, K, V, Type>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn as_leaf(&self) -> &LeafNode<K, V>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn keys(&self) -> &[K]
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn vals(&self) -> &[V]
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn ascend(self) -> Result<Handle<NodeRef<BorrowType, K, V, Internal>, Edge>, Self>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn first_edge(self) -> Handle<Self, Edge>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn last_edge(self) -> Handle<Self, Edge>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
impl<K, V> NodeRef<Owned, K, V, Leaf>
unsafe fn deallocate_and_ascend(self) -> Option<Handle<NodeRef<Owned, K, V, Internal>, Edge>>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
impl<K, V> NodeRef<Owned, K, V, Internal>
unsafe fn deallocate_and_ascend(self) -> Option<Handle<NodeRef<Owned, K, V, Internal>, Edge>>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
impl<'a, K, V, Type> NodeRef<Mut<'a>, K, V, Type>
unsafe fn cast_unchecked<NewType>(&mut self) -> NodeRef<Mut, K, V, NewType>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
unsafe fn reborrow_mut(&mut self) -> NodeRef<Mut, K, V, Type>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn as_leaf_mut(&mut self) -> &mut LeafNode<K, V>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn keys_mut(&mut self) -> &mut [K]
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn vals_mut(&mut self) -> &mut [V]
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
impl<'a, K: 'a, V: 'a, Type> NodeRef<Immut<'a>, K, V, Type>
fn into_slices(self) -> (&'a [K], &'a [V])
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
impl<'a, K: 'a, V: 'a, Type> NodeRef<Mut<'a>, K, V, Type>
fn into_root_mut(self) -> &'a mut Root<K, V>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn into_slices_mut(self) -> (&'a mut [K], &'a mut [V])
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
impl<'a, K, V> NodeRef<Mut<'a>, K, V, Leaf>
fn push(&mut self, key: K, val: V)
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn push_front(&mut self, key: K, val: V)
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
impl<'a, K, V> NodeRef<Mut<'a>, K, V, Internal>
fn push(&mut self, key: K, val: V, edge: Root<K, V>)
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn push_front(&mut self, key: K, val: V, edge: Root<K, V>)
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
impl<'a, K, V> NodeRef<Mut<'a>, K, V, LeafOrInternal>
fn pop(&mut self) -> (K, V, Option<Root<K, V>>)
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
fn pop_front(&mut self) -> (K, V, Option<Root<K, V>>)
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead
impl<BorrowType, K, V> NodeRef<BorrowType, K, V, LeafOrInternal>
fn force(self) -> ForceResult<NodeRef<BorrowType, K, V, Leaf>, NodeRef<BorrowType, K, V, Internal>>
collections
#27783): library is unlikely to be stabilized with the current layout and name, use std::collections instead