Lines Matching refs:parent
19318 //! with boxes because each node often has only one owner, the parent.
19527 //! [`Rc`] pointers from parent nodes to children, and [`Weak`] pointers from
21436 /// have strong [`Rc`] pointers from parent nodes to children, and `Weak`
23382 /// strong `Arc` pointers from parent nodes to children, and [`Weak`]
23535 /// have strong [`Arc`] pointers from parent nodes to children, and `Weak`
29234 Ok(parent) => {
29235 let parent = parent.into_node();
29236 if parent.len() < node::CAPACITY {
29238 open_node = parent;
29242 test_node = parent.forget_type();
34120 /// edge in its parent node dangling.
34138 /// edge in its parent node dangling.
37787 // Only if we merged, the parent (if any) has shrunk, but skipping
37791 // by handling its parent recursively; at worst we will destroy or
37792 // rearrange the parent through the grandparent, thus change the
37793 // link to the parent inside the leaf.
37794 if let Ok(parent) = unsafe { pos.reborrow_mut() }.into_node().ascend() {
37795 if !parent.into_node().forget_type().fix_node_and_affected_ancestors() {
37934 // parent: Option<(NonNull<Node<K, V, height + 1>>, u16)>,
37973 parent: Option<NonNull<InternalNode<K, V>>>,
37975 /// This node's index into the parent node's `edges` array.
37976 /// `*node.parent.edges[node.parent_idx]` should be the same thing as `node`.
37977 /// This is only guaranteed to be initialized when `parent` is non-null.
37996 ptr::addr_of_mut!((*this).parent).write(None);
38165 /// Unpack a node reference that was packed as `NodeRef::parent`.
38227 /// Finds the parent of the current node. Returns `Ok(handle)` if the current
38228 /// node actually has a parent, where `handle` points to the edge of the parent
38230 /// no parent, giving back the original `NodeRef`.
38243 unsafe { (*leaf_ptr).parent }
38245 .map(|parent| Handle {
38246 node: NodeRef::from_internal(*parent, self.height + 1),
38308 /// Similar to `ascend`, gets a reference to a node's parent node, but also
38450 /// Sets the node's link to its parent edge,
38452 fn set_parent_link(&mut self, parent: NonNull<InternalNode<K, V>>, parent_idx: usize) {
38454 unsafe { (*leaf).parent = Some(parent) };
38460 /// Clears the root's link to its parent edge.
38464 leaf.parent = None;
38737 /// The goal of the split point is for its key and value to end up in a parent node;
38800 /// Fixes the parent pointer and index in the child node that this edge
38866 /// insert the split off portion into the parent node recursively, until the root is reached.
38885 Ok(parent) => match parent.insert(split.kv.0, split.kv.1, split.right) {
39060 parent: Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::KV>,
39070 parent: self,
39079 /// the KV immediately to the left or to the right in the parent node.
39080 /// Returns an `Err` if there is no parent.
39081 /// Panics if the parent is empty.
39096 parent: unsafe { ptr::read(&left_parent_kv) },
39102 parent: unsafe { ptr::read(&right_parent_kv) },
39150 let Handle { node: mut parent_node, idx: parent_idx, _marker } = self.parent;
39201 /// Merges the parent's key-value pair and both adjacent child nodes into
39202 /// the left child node and returns the shrunk parent node.
39206 self.do_merge(|parent, _child| parent)
39209 /// Merges the parent's key-value pair and both adjacent child nodes into
39217 /// Merges the parent's key-value pair and both adjacent child nodes into
39241 /// of the parent, while pushing the old parent key-value pair into the right child.
39253 /// of the parent, while pushing the old parent key-value pair onto the left child.
39298 // Move the left-most stolen pair to the parent.
39301 let (k, v) = self.parent.replace_kv(k, v);
39303 // Move parent's key-value pair to the right child.
39347 // Move the right-most stolen pair to the parent.
39350 let (k, v) = self.parent.replace_kv(k, v);
39352 // Move parent's key-value pair to the left child.
39636 // Asserts that the back pointer in each reachable node points to its parent.
39736 /// sibling. If succesful but at the cost of shrinking the parent node,
39737 /// returns that shrunk parent node. Returns an `Err` if the node is
39749 let parent = left_parent_kv.merge_tracking_parent();
39750 Ok(Some(parent))
39758 let parent = right_parent_kv.merge_tracking_parent();
39759 Ok(Some(parent))
39778 /// Stocks up a possibly underfull node, and if that causes its parent node
39779 /// to shrink, stocks up the parent, recursively.
39788 Ok(Some(parent)) => self = parent.forget_type(),
44807 let parent = (hole.pos() - 1) / 2;
44811 // This guarantees that parent < hole.pos() so
44813 if hole.element() <= unsafe { hole.get(parent) } {
44818 unsafe { hole.move_to(parent) };
46673 /// The SourceIter parent trait is necessary for the specializing function to access the allocation