Struct flange_flat_tree::VecTree
source · [−]Fields
values: Vec<A>
Trait Implementations
sourceimpl<'a, A> Tree<'a> for VecTree<A>where
A: 'a,
impl<'a, A> Tree<'a> for VecTree<A>where
A: 'a,
type SubtreeType = SubtreeImpl<&'a VecTree<A>>
type SubtreeType = SubtreeImpl<&'a VecTree<A>>
The type of the subtree, returned by
root()
sourcefn at_pos(&'a self, index: usize) -> Self::SubtreeType
fn at_pos(&'a self, index: usize) -> Self::SubtreeType
Direct access to a node in the tree via its position in the flat map
Direct access to the
Navigator
storing the neighboring information of the treesourcefn root(&'a self) -> Self::SubtreeType
fn root(&'a self) -> Self::SubtreeType
The root node of the tree.
sourcefn node_count(&'a self) -> usize
fn node_count(&'a self) -> usize
The number of nodes in the tree.
sourcefn map<B, M>(&'a self, m: M) -> MappedTree<Self::Node, B, M, &'a Self>where
M: Fn(usize, Self::Node) -> B,
fn map<B, M>(&'a self, m: M) -> MappedTree<Self::Node, B, M, &'a Self>where
M: Fn(usize, Self::Node) -> B,
Create a new tree using a function to map from the nodes of this tree.
The map function can also include external data sources. Read more
sourcefn flange<B>(&'a self, data: Vec<B>) -> FlangedTree<&'a Self, B>
fn flange<B>(&'a self, data: Vec<B>) -> FlangedTree<&'a Self, B>
Flange data to the nodes.
A new tree is created, that references the old tree and whos
Node
type is a typle with a reference to the old data
and a reference to the new data from the inserted data
vector. Read moresourcefn flange_map<B, F>(&'a self, mapf: F) -> FlangedTree<&'a Self, B>where
B: 'a,
B: Clone,
F: Fn(Self::Node) -> B,
fn flange_map<B, F>(&'a self, mapf: F) -> FlangedTree<&'a Self, B>where
B: 'a,
B: Clone,
F: Fn(Self::Node) -> B,
Use
flange
, but create the data using the mapf
functionfn for_each<F>(&'a self, f: F)where
F: FnMut(Self::SubtreeType),
Auto Trait Implementations
impl<A> RefUnwindSafe for VecTree<A>where
A: RefUnwindSafe,
impl<A> Send for VecTree<A>where
A: Send,
impl<A> Sync for VecTree<A>where
A: Sync,
impl<A> Unpin for VecTree<A>where
A: Unpin,
impl<A> UnwindSafe for VecTree<A>where
A: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more