Another way to see elements in the tree is through iterations. Here is an example:
use rstar::RTree;
fn main() {
let tree: RTree<(i32, i32)> = RTree::new();
for element in &tree {
println!("{:?}", element);
}
}
We can also use iter and iter_mut to obtain an (mutable) iteration of the elements in the tree.
➡️ Next: Inserting One Element At A Time
📘 Back: Table of contents