pub struct EytzingerTree<N> { /* fields omitted */ }
An Eytzinger tree is an N-tree stored in an array structure.
Creates a new Eytzinger tree with the specified maximum number of child nodes per parent.
The new Eytzinger tree.
Gets a depth-first iterator over all nodes.
Gets a breadth-first iterator over all nodes.
Gets whether the Eytzinger tree is empty.
Gets the number of nodes in the Eytzinger tree.
Gets the maximum number of children per parent node.
Clears the Eytzinger tree, removing all nodes.
Gets the root node, None
if there was no root node.
The root node may be set with set_root_value
.
Gets the mutable root node, None
if there was no root node.
The root node may be set with set_root_value
.
Sets the value of the root node. All child nodes will remain as they are.
The new root node.
Removes the root value. This will also remove all children.
The old root value if there was one.
pub fn root_entry(&mut self) -> Entry<N> | [src] |
Gets the entry for the root node.
use lz_eytzinger_tree::{EytzingerTree, entry::Entry};
let tree = {
let mut tree = EytzingerTree::<u32>::new(8);
tree.root_entry().or_insert(5);
tree
};
let root = tree.root().unwrap();
assert_eq!(root.value(), &5);
Builds a new EytzingerTree<N>
with the values mapped
using the specified selector.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
type Owned = T
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
type Error = !
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static