flange-flat-tree 0.2.2

A tree that can be expanded by attaching new values to the node without mutability of the old ones
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub mod subtree_impl;

pub trait Subtree: Sized {
    type Node;

    fn get_pos(&self) -> usize;
    fn value(&self) -> Self::Node;
    fn parent(&self) -> Option<Self>;
    fn children(&self) -> Vec<Self>;
    fn child_values(&self) -> Vec<Self::Node>;
    fn first_child(&self) -> Option<Self>;
    fn prev_sibling(&self) -> Option<Self>;
    fn next_sibling(&self) -> Option<Self>;
}