Lines Matching full:valid
170 /// valid, and pointing to a field of our internal representation of a node.
205 // - `self.root` is a valid pointer to a tree root. in iter()
206 // - `bindings::rb_first` produces a valid pointer to a node given `root` is valid. in iter()
208 // SAFETY: by the invariants, all pointers are valid. in iter()
220 // - `self.root` is a valid pointer to a tree root. in iter_mut()
221 // - `bindings::rb_first` produces a valid pointer to a node given `root` is valid. in iter_mut()
223 // SAFETY: by the invariants, all pointers are valid. in iter_mut()
248 // SAFETY: `self.root` is always a valid root node. in cursor_front_mut()
252 // - `current` is a valid node in the [`RBTree`] pointed to by `self`. in cursor_front_mut()
263 // SAFETY: `self.root` is always a valid root node. in cursor_front()
267 // - `current` is a valid node in the [`RBTree`] pointed to by `self`. in cursor_front()
278 // SAFETY: `self.root` is always a valid root node. in cursor_back_mut()
282 // - `current` is a valid node in the [`RBTree`] pointed to by `self`. in cursor_back_mut()
293 // SAFETY: `self.root` is always a valid root node. in cursor_back()
297 // - `current` is a valid node in the [`RBTree`] pointed to by `self`. in cursor_back()
363 // SAFETY: `raw_self` is a valid pointer to the `RBTree` (created from `self` above). in raw_entry()
370 // SAFETY: `node` is a non-null node so it is valid by the type invariants. in raw_entry()
372 // SAFETY: `curr` is a non-null node so it is valid by the type invariants. in raw_entry()
374 // SAFETY: `curr` is a non-null node so it is valid by the type invariants. in raw_entry()
417 // SAFETY: `this` is a non-null node so it is valid by the type invariants. in get()
419 // SAFETY: `node` is a non-null node so it is valid by the type invariants. in get()
421 // SAFETY: `node` is a non-null node so it is valid by the type invariants. in get()
423 // SAFETY: `node` is a non-null node so it is valid by the type invariants. in get()
462 // - `current` is a valid node in the [`RBTree`] pointed to by `self`. in cursor_lower_bound_mut()
483 // - `current` is a valid node in the [`RBTree`] pointed to by `self`. in cursor_lower_bound()
499 // SAFETY: `this` is a non-null node so it is valid by the type invariants. in find_best_match()
501 // SAFETY: `node` is a non-null node so it is valid by the type invariants. in find_best_match()
503 // SAFETY: `node` is a non-null node so it is valid by the type invariants. in find_best_match()
507 // SAFETY: `this` is a non-null node so it is valid by the type invariants. in find_best_match()
521 // SAFETY: `this` is a non-null node so it is valid by the type invariants. in find_best_match()
540 // SAFETY: `root` is valid as it's embedded in `self` and we have a valid `self`. in drop()
543 // INVARIANT: The loop invariant is that all tree nodes from `next` in postorder are valid. in drop()
549 // SAFETY: `next` and all nodes in postorder are still valid. in drop()
555 // SAFETY: `this` is valid per the loop invariant. in drop()
828 // - `self.current` is a valid node by the type invariants. in current()
835 /// - `node` must be a valid pointer to a node in an [`RBTree`].
842 // thus `this` is valid by the type invariants. in to_key_value()
845 // thus `this` is valid by the type invariants. in to_key_value()
863 // - `neighbor` is a valid tree node. in peek()
870 // SAFETY: `self.current` is valid by the type invariants. in get_neighbor_raw()
897 // - `self.current` is a valid node by the type invariants. in current()
905 // - `self.current` is a valid node by the type invariants. in current_mut()
921 // SAFETY: `this` is valid by the type invariants as described above. in remove_current()
925 // the tree cannot change. By the tree invariant, all nodes are valid. in remove_current()
929 // - `current` is a valid node in the [`RBTree`] pointed to by `self.tree`. in remove_current()
952 // the tree cannot change. By the tree invariant, all nodes are valid. in remove_neighbor()
957 // SAFETY: `this` is valid by the type invariants as described above. in remove_neighbor()
976 // - `neighbor` is a valid node in the [`RBTree`] pointed to by `self.tree`. in mv()
996 // - `neighbor` is a valid tree node. in peek()
1015 // - `neighbor` is a valid tree node. in peek_mut()
1022 // SAFETY: `self.current` is valid by the type invariants. in get_neighbor_raw()
1035 /// - `node` must be a valid pointer to a node in an [`RBTree`].
1038 // SAFETY: the caller guarantees that `node` is a valid pointer in an `RBTree`. in to_key_value()
1046 /// - `node` must be a valid pointer to a node in an [`RBTree`].
1049 // SAFETY: the caller guarantees that `node` is a valid pointer in an `RBTree`. in to_key_value_mut()
1057 /// - `node` must be a valid pointer to a node in an [`RBTree`].
1064 // thus `this` is valid by the type invariants. in to_key_value_raw()
1067 // thus `this` is valid by the type invariants. in to_key_value_raw()
1110 // SAFETY: Due to `self._tree`, `k` and `v` are valid for the lifetime of `'a`. in next()
1154 /// - `self.next` is a valid pointer.
1155 /// - `self.next` points to a node stored inside of a valid `RBTree`.
1169 // SAFETY: By the type invariant of `IterRaw`, `self.next` is a valid node in an `RBTree`, in next()
1173 // SAFETY: `self.next` is a valid tree node by the type invariants. in next()
1298 /// - `child_field_of_parent` is a valid pointer to the left-child or right-child of `parent`. If `…
1318 // SAFETY: `node` is valid at least until we call `KBox::from_raw`, which only happens when in insert()
1322 // INVARIANT: We are linking in a new node, which is valid. It remains valid because we in insert()
1327 // SAFETY: All pointers are valid. `node` has just been inserted into the tree. in insert()
1330 // SAFETY: The node is valid until we remove it from the tree. in insert()
1345 /// - `node_links` is a valid, non-null pointer to a tree node in `self.rbtree`
1356 // - `self.node_links` is a valid pointer to a node in the tree. in get()
1364 // - `self.node_links` is a valid pointer to a node in the tree. in get_mut()
1374 // - `self.node_links` is a valid pointer to a node in the tree. in into_mut()
1381 // SAFETY: The node is a node in the tree, so it is valid. in remove_node()
1407 // SAFETY: `node` is valid at least until we call `KBox::from_raw`, which only happens when in replace()
1418 // - `self.node_ptr` produces a valid pointer to a node in the tree. in replace()