MCPcopy Create free account

hub / github.com/ArnaudValensi/vec-tree / functions

Functions59 in github.com/ArnaudValensi/vec-tree

↓ 33 callersMethodinsert
(&mut self, data: T, parent_id: Index)
src/lib.rs:295
↓ 24 callersMethodtry_insert
(&mut self, data: T, parent_id: Index)
src/lib.rs:264
↓ 16 callersMethodinsert_root
(&mut self, data: T)
src/lib.rs:363
↓ 14 callersMethodtry_insert_root
(&mut self, data: T)
src/lib.rs:331
↓ 8 callersMethodremove
Remove the element at index `node_id` from the tree. If the element at index `node_id` is still in the tree, then it is returned. If it is not in the
src/lib.rs:420
↓ 6 callersMethoddescendants
Return an iterator of references to this node and its descendants, in tree order. Parent nodes appear before the descendants. Call `.next().unwrap()`
src/lib.rs:741
↓ 3 callersMethodappend_child
(&mut self, node_id: Index, new_child_id: Index)
src/lib.rs:499
↓ 3 callersMethodget
Get a shared reference to the element at index `node_id` if it is in the tree. If the element at index `node_id` is not in the tree, then `None` is r
src/lib.rs:575
↓ 2 callersMethodcreate_node
(&mut self, data: T)
src/lib.rs:391
↓ 2 callersMethodparent
Return an iterator of references to this node’s parent.
src/lib.rs:673
↓ 2 callersMethodtry_create_node
(&mut self, data: T)
src/lib.rs:374
↓ 1 callersMethodcontains
Is the element at index `node_id` in the tree? Returns `true` if the element at `node_id` is in the tree, `false` otherwise. # Examples ``` use vec
src/lib.rs:494
↓ 1 callersMethoddescendants_with_depth
Return an iterator of references to this node and its descendants, with deoth in the tree, in tree order. Parent nodes appear before the descendants.
src/lib.rs:750
↓ 1 callersMethoddetach
(&mut self, node_id: Index)
src/lib.rs:535
↓ 1 callersMethodget_mut
Get an exclusive reference to the element at index `node_id` if it is in the tree. If the element at index `node_id` is not in the tree, then `None`
src/lib.rs:599
↓ 1 callersMethodreserve
(&mut self, additional_capacity: usize)
src/lib.rs:232
↓ 1 callersMethodtraverse
Return an iterator of references to this node and its descendants, in tree order.
src/lib.rs:719
↓ 1 callersMethodtraverse_with_depth
Return an iterator of references to this node and its descendants, with deoth in the tree, in tree order.
src/lib.rs:729
Functionadd_children_and_iterate_over_it
()
tests/tests.rs:233
Methodancestors
Return an iterator of references to this node and its ancestors. Call `.next().unwrap()` once on the iterator to skip the node itself.
src/lib.rs:711
Functioncannot_get_free_value
()
tests/tests.rs:55
Functioncannot_get_other_generation_value
()
tests/tests.rs:63
Methodcapacity
Get the capacity of this tree. The capacity is the maximum number of elements the tree can hold without further allocation, including however many it
src/lib.rs:649
Functioncapacity_and_reserve
()
tests/tests.rs:97
Functioncargo_readme_up_to_date
()
tests/readme.rs:6
Functioncheck_descendants_are_removed
It would panic when adding node_5 if the nodes where not recursively removed.
tests/tests.rs:450
Functioncheck_remove_with_one_child
()
tests/tests.rs:161
Functioncheck_the_validity_of_the_tree_after_remove
()
tests/tests.rs:122
Methodchildren
Return an iterator of references to this node’s children.
src/lib.rs:681
Methodclear
Clear all the items inside the tree, but keep its allocation. # Examples ``` use vec_tree::VecTree; let mut tree = VecTree::with_capacity(1); let r
src/lib.rs:667
Methoddefault
()
src/lib.rs:167
Methodfmt
(&self, f: &mut fmt::Formatter)
src/lib.rs:756
Methodfollowing_siblings
Return an iterator of references to this node and the siblings after it. Call `.next().unwrap()` once on the iterator to skip the node itself.
src/lib.rs:701
Functionget_mut
()
tests/tests.rs:105
Functionget_parent
()
tests/tests.rs:215
Methodget_root_index
Get the root node index from the tree. If no root node is created in the tree, None is returned. # Examples ``` use vec_tree::VecTree; let mut tre
src/lib.rs:621
Methodindex
(&self, index: Index)
src/lib.rs:768
Functionindex_deleted_item
()
tests/tests.rs:114
Methodindex_mut
(&mut self, index: Index)
src/lib.rs:774
Functioninsert_many_and_cause_doubling
()
tests/tests.rs:84
Functioninsert_root
()
tests/tests.rs:12
Functioninsert_root_twice
()
tests/tests.rs:39
Functioniterate_over_ancestors
()
tests/tests.rs:348
Functioniterate_over_descendants
()
tests/tests.rs:386
Functioniterate_over_descendants_with_depth
()
tests/tests.rs:413
Functioniterate_over_following_siblings
()
tests/tests.rs:310
Functioniterate_over_preceding_siblings
()
tests/tests.rs:272
Functionmove_a_node
()
tests/tests.rs:487
Methodnew
Constructs a new, empty `VecTree`. # Examples ``` use vec_tree::VecTree; let mut tree = VecTree::<usize>::new(); # let _ = tree; ```
src/lib.rs:183
Methodnext
(&mut self)
src/lib.rs:850
Functionout_of_bounds_get_with_index_from_other_tree
()
tests/tests.rs:195
Functionout_of_bounds_remove_with_index_from_other_tree
()
tests/tests.rs:205
Methodpreceding_siblings
Return an iterator of references to this node and the siblings before it. Call `.next().unwrap()` once on the iterator to skip the node itself.
src/lib.rs:691
Functionremove_a_root_node
()
tests/tests.rs:46
Functiontry_insert
()
tests/tests.rs:19
Functiontry_insert_root
()
tests/tests.rs:5
Functiontry_insert_root_twice
()
tests/tests.rs:31
Functiontry_insert_when_full
()
tests/tests.rs:76
Methodwith_capacity
Constructs a new, empty `VecTree<T>` with the specified capacity. The `VecTree<T>` will be able to hold `n` elements without further allocation. # E
src/lib.rs:207