indextree
Arena based tree structure with multithreading support
This arena tree structure is using just a single Vec
and numerical identifiers
(indices in the vector) instead of reference counted pointers. This means there
is no RefCell
and mutability is handled in a way much more idiomatic to Rust
through unique (&mut) access to the arena. The tree can be sent or shared across
threads like a Vec
. This enables general multiprocessing support like
parallel tree traversals.
Example usage
use Arena;
// Create a new arena
let arena = &mut new;
// Add some new nodes to the arena
let a = arena.new_node;
let b = arena.new_node;
// Append a to b
assert!;
assert_eq!;