Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ArnaudValensi/vec-tree
/ functions
Functions
59 in github.com/ArnaudValensi/vec-tree
⨍
Functions
59
◇
Types & classes
12
↓ 33 callers
Method
insert
(&mut self, data: T, parent_id: Index)
src/lib.rs:295
↓ 24 callers
Method
try_insert
(&mut self, data: T, parent_id: Index)
src/lib.rs:264
↓ 16 callers
Method
insert_root
(&mut self, data: T)
src/lib.rs:363
↓ 14 callers
Method
try_insert_root
(&mut self, data: T)
src/lib.rs:331
↓ 8 callers
Method
remove
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 callers
Method
descendants
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 callers
Method
append_child
(&mut self, node_id: Index, new_child_id: Index)
src/lib.rs:499
↓ 3 callers
Method
get
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 callers
Method
create_node
(&mut self, data: T)
src/lib.rs:391
↓ 2 callers
Method
parent
Return an iterator of references to this node’s parent.
src/lib.rs:673
↓ 2 callers
Method
try_create_node
(&mut self, data: T)
src/lib.rs:374
↓ 1 callers
Method
contains
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 callers
Method
descendants_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 callers
Method
detach
(&mut self, node_id: Index)
src/lib.rs:535
↓ 1 callers
Method
get_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 callers
Method
reserve
(&mut self, additional_capacity: usize)
src/lib.rs:232
↓ 1 callers
Method
traverse
Return an iterator of references to this node and its descendants, in tree order.
src/lib.rs:719
↓ 1 callers
Method
traverse_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
Function
add_children_and_iterate_over_it
()
tests/tests.rs:233
Method
ancestors
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
Function
cannot_get_free_value
()
tests/tests.rs:55
Function
cannot_get_other_generation_value
()
tests/tests.rs:63
Method
capacity
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
Function
capacity_and_reserve
()
tests/tests.rs:97
Function
cargo_readme_up_to_date
()
tests/readme.rs:6
Function
check_descendants_are_removed
It would panic when adding node_5 if the nodes where not recursively removed.
tests/tests.rs:450
Function
check_remove_with_one_child
()
tests/tests.rs:161
Function
check_the_validity_of_the_tree_after_remove
()
tests/tests.rs:122
Method
children
Return an iterator of references to this node’s children.
src/lib.rs:681
Method
clear
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
Method
default
()
src/lib.rs:167
Method
fmt
(&self, f: &mut fmt::Formatter)
src/lib.rs:756
Method
following_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
Function
get_mut
()
tests/tests.rs:105
Function
get_parent
()
tests/tests.rs:215
Method
get_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
Method
index
(&self, index: Index)
src/lib.rs:768
Function
index_deleted_item
()
tests/tests.rs:114
Method
index_mut
(&mut self, index: Index)
src/lib.rs:774
Function
insert_many_and_cause_doubling
()
tests/tests.rs:84
Function
insert_root
()
tests/tests.rs:12
Function
insert_root_twice
()
tests/tests.rs:39
Function
iterate_over_ancestors
()
tests/tests.rs:348
Function
iterate_over_descendants
()
tests/tests.rs:386
Function
iterate_over_descendants_with_depth
()
tests/tests.rs:413
Function
iterate_over_following_siblings
()
tests/tests.rs:310
Function
iterate_over_preceding_siblings
()
tests/tests.rs:272
Function
move_a_node
()
tests/tests.rs:487
Method
new
Constructs a new, empty `VecTree`. # Examples ``` use vec_tree::VecTree; let mut tree = VecTree::<usize>::new(); # let _ = tree; ```
src/lib.rs:183
Method
next
(&mut self)
src/lib.rs:850
Function
out_of_bounds_get_with_index_from_other_tree
()
tests/tests.rs:195
Function
out_of_bounds_remove_with_index_from_other_tree
()
tests/tests.rs:205
Method
preceding_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
Function
remove_a_root_node
()
tests/tests.rs:46
Function
try_insert
()
tests/tests.rs:19
Function
try_insert_root
()
tests/tests.rs:5
Function
try_insert_root_twice
()
tests/tests.rs:31
Function
try_insert_when_full
()
tests/tests.rs:76
Method
with_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