Lines Matching full:valid

170 /// valid, and pointing to a field of our internal representation of a node.
199 // - `self.root` is a valid pointer to a tree root.
200 // - `bindings::rb_first` produces a valid pointer to a node given `root` is valid.
202 // SAFETY: by the invariants, all pointers are valid.
214 // - `self.root` is a valid pointer to a tree root.
215 // - `bindings::rb_first` produces a valid pointer to a node given `root` is valid.
217 // SAFETY: by the invariants, all pointers are valid.
242 // SAFETY: `self.root` is always a valid root node
246 // - `current` is a valid node in the [`RBTree`] pointed to by `self`.
257 // SAFETY: `self.root` is always a valid root node
261 // - `current` is a valid node in the [`RBTree`] pointed to by `self`.
327 // SAFETY: `raw_self` is a valid pointer to the `RBTree` (created from `self` above).
334 // SAFETY: `node` is a non-null node so it is valid by the type invariants.
336 // SAFETY: `curr` is a non-null node so it is valid by the type invariants.
338 // SAFETY: `curr` is a non-null node so it is valid by the type invariants.
381 // SAFETY: `this` is a non-null node so it is valid by the type invariants.
383 // SAFETY: `node` is a non-null node so it is valid by the type invariants.
385 // SAFETY: `node` is a non-null node so it is valid by the type invariants.
387 // SAFETY: `node` is a non-null node so it is valid by the type invariants.
428 // SAFETY: `this` is a non-null node so it is valid by the type invariants.
430 // SAFETY: `node` is a non-null node so it is valid by the type invariants.
432 // SAFETY: `node` is a non-null node so it is valid by the type invariants.
446 // SAFETY: `best` is a non-null node so it is valid by the type invariants.
461 // SAFETY: `best` is a non-null node so it is valid by the type invariants.
466 // - `current` is a valid node in the [`RBTree`] pointed to by `self`.
483 // SAFETY: `root` is valid as it's embedded in `self` and we have a valid `self`.
486 // INVARIANT: The loop invariant is that all tree nodes from `next` in postorder are valid.
492 // SAFETY: `next` and all nodes in postorder are still valid.
498 // SAFETY: `this` is valid per the loop invariant.
741 // - `self.current` is a valid node by the type invariants.
749 // - `self.current` is a valid node by the type invariants.
765 // SAFETY: `this` is valid by the type invariants as described above.
769 // the tree cannot change. By the tree invariant, all nodes are valid.
782 // - `current` is a valid node in the [`RBTree`] pointed to by `self.tree`.
805 // the tree cannot change. By the tree invariant, all nodes are valid.
810 // SAFETY: `this` is valid by the type invariants as described above.
829 // - `neighbor` is a valid node in the [`RBTree`] pointed to by `self.tree`.
849 // - `neighbor` is a valid tree node.
868 // - `neighbor` is a valid tree node.
875 // SAFETY: `self.current` is valid by the type invariants.
888 /// - `node` must be a valid pointer to a node in an [`RBTree`].
891 // SAFETY: the caller guarantees that `node` is a valid pointer in an `RBTree`.
899 /// - `node` must be a valid pointer to a node in an [`RBTree`].
902 // SAFETY: the caller guarantees that `node` is a valid pointer in an `RBTree`.
910 /// - `node` must be a valid pointer to a node in an [`RBTree`].
917 // thus `this` is valid by the type invariants.
920 // thus `this` is valid by the type invariants.
963 // SAFETY: Due to `self._tree`, `k` and `v` are valid for the lifetime of `'a`.
1007 /// - `self.next` is a valid pointer.
1008 /// - `self.next` points to a node stored inside of a valid `RBTree`.
1022 // SAFETY: By the type invariant of `IterRaw`, `self.next` is a valid node in an `RBTree`,
1026 // SAFETY: `self.next` is a valid tree node by the type invariants.
1151 /// - `child_field_of_parent` is a valid pointer to the left-child or right-child of `parent`. If `parent` is
1171 // SAFETY: `node` is valid at least until we call `Box::from_raw`, which only happens when
1175 // INVARIANT: We are linking in a new node, which is valid. It remains valid because we
1180 // SAFETY: All pointers are valid. `node` has just been inserted into the tree.
1183 // SAFETY: The node is valid until we remove it from the tree.
1198 /// - `node_links` is a valid, non-null pointer to a tree node in `self.rbtree`
1209 // - `self.node_links` is a valid pointer to a node in the tree.
1217 // - `self.node_links` is a valid pointer to a node in the tree.
1227 // - `self.node_links` is a valid pointer to a node in the tree.
1234 // SAFETY: The node is a node in the tree, so it is valid.
1262 // SAFETY: `node` is valid at least until we call `Box::from_raw`, which only happens when
1273 // - `self.node_ptr` produces a valid pointer to a node in the tree.