Lines Matching refs:NodePtr
36 left: NodePtr<K, V>,
37 right: NodePtr<K, V>,
38 parent: NodePtr<K, V>,
62 struct NodePtr<K: Ord, V>(*mut RBTreeNode<K, V>); struct
64 impl<K: Ord, V> Clone for NodePtr<K, V> { implementation
65 fn clone(&self) -> NodePtr<K, V> { in clone()
66 NodePtr(self.0) in clone()
70 impl<K: Ord, V> Copy for NodePtr<K, V> {} implementation
72 impl<K: Ord, V> Ord for NodePtr<K, V> { implementation
73 fn cmp(&self, other: &NodePtr<K, V>) -> Ordering { in cmp()
78 impl<K: Ord, V> PartialOrd for NodePtr<K, V> { implementation
79 fn partial_cmp(&self, other: &NodePtr<K, V>) -> Option<Ordering> { in partial_cmp()
84 impl<K: Ord, V> PartialEq for NodePtr<K, V> { implementation
85 fn eq(&self, other: &NodePtr<K, V>) -> bool { in eq()
90 impl<K: Ord, V> Eq for NodePtr<K, V> {} implementation
92 impl<K: Ord, V> NodePtr<K, V> { implementation
93 fn new(k: K, v: V) -> NodePtr<K, V> { in new()
96 left: NodePtr::null(), in new()
97 right: NodePtr::null(), in new()
98 parent: NodePtr::null(), in new()
102 NodePtr(Box::into_raw(Box::new(node))) in new()
160 fn min_node(self) -> NodePtr<K, V> { in min_node()
169 fn max_node(self) -> NodePtr<K, V> { in max_node()
178 fn next(self) -> NodePtr<K, V> { in next()
185 return NodePtr::null(); in next()
196 fn prev(self) -> NodePtr<K, V> { in prev()
203 return NodePtr::null(); in prev()
214 fn set_parent(&mut self, parent: NodePtr<K, V>) { in set_parent()
222 fn set_left(&mut self, left: NodePtr<K, V>) { in set_left()
230 fn set_right(&mut self, right: NodePtr<K, V>) { in set_right()
238 fn parent(&self) -> NodePtr<K, V> { in parent()
240 return NodePtr::null(); in parent()
246 fn left(&self) -> NodePtr<K, V> { in left()
248 return NodePtr::null(); in left()
254 fn right(&self) -> NodePtr<K, V> { in right()
256 return NodePtr::null(); in right()
262 fn null() -> NodePtr<K, V> { in null()
263 NodePtr(ptr::null_mut()) in null()
272 impl<K: Ord + Clone, V: Clone> NodePtr<K, V> { impl
273 unsafe fn deep_clone(&self) -> NodePtr<K, V> { in deep_clone()
274 let mut node = NodePtr::new((*self.0).key.clone(), (*self.0).value.clone()); in deep_clone()
342 root: NodePtr<K, V>,
378 fn tree_print(&self, node: NodePtr<K, V>, direction: i32) { in tree_print()
604 head: NodePtr<K, V>,
605 tail: NodePtr<K, V>,
683 head: NodePtr<K, V>,
684 tail: NodePtr<K, V>,
759 head: NodePtr<K, V>,
760 tail: NodePtr<K, V>,
825 head: NodePtr::null(), in into_iter()
826 tail: NodePtr::null(), in into_iter()
845 root: NodePtr::null(), in new()
877 unsafe fn left_rotate(&mut self, mut node: NodePtr<K, V>) { in left_rotate()
912 unsafe fn right_rotate(&mut self, mut node: NodePtr<K, V>) { in right_rotate()
961 unsafe fn insert_fixup(&mut self, mut node: NodePtr<K, V>) { in insert_fixup()
1023 let mut node = NodePtr::new(k, v); in insert()
1024 let mut y = NodePtr::null(); in insert()
1060 fn find_node(&self, k: &K) -> NodePtr<K, V> { in find_node()
1062 return NodePtr::null(); in find_node()
1078 NodePtr::null() in find_node()
1082 fn first_child(&self) -> NodePtr<K, V> { in first_child()
1084 NodePtr::null() in first_child()
1095 fn last_child(&self) -> NodePtr<K, V> { in last_child()
1097 NodePtr::null() in last_child()
1191 fn clear_recurse(&mut self, current: NodePtr<K, V>) { in clear_recurse()
1204 self.root = NodePtr::null(); in clear()
1211 self.root = NodePtr::null(); in fast_clear()
1224 unsafe fn delete_fixup(&mut self, mut node: NodePtr<K, V>, mut parent: NodePtr<K, V>) { in delete_fixup()
1296 unsafe fn delete(&mut self, node: NodePtr<K, V>) -> (K, V) { in delete()