# generic-tree [![Regression](https://github.com/seirdb/generic-tree/workflows/Build%20and%20test/badge.svg)](https://github.com/seirdb/generic-tree/actions) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/seirdb/generic-tree/blob/master/LICENSE) [![Documentation](https://docs.rs/generic-tree/badge.svg)](https://docs.rs/generic-tree) This crate provides a very simple, intuitive API for storing data in a tree-like structure. # Example To get started, add the following to `Cargo.toml`. ```toml generic-tree = "0.1" ``` ```rust,no_run use generic_tree::{Tree, Node}; struct Data; fn main() { // Create a root Node let mut root = Node::new("root", Data); // Create a tree from it let mut tree = Tree::init(root); // Create a child let child = Node::new("child", Data); // And add it as a child of `root` tree.add_node(&["root"], child); // Get a reference to the child let child = tree.get_node(&["root", "child"]).unwrap(); } ```