Annotated even-arity trees backed by mmaps.
toml
whistlinoak = "0.1"
```rust use tempfile::NamedTempFile; use whistlinoak::{Annotation, Tree};
let file = NamedTempFile::new().unwrap(); let path = file.intotemppath();
struct Cardinality(usize);
impl
fn combine<'a>(annotations: impl Iterator<Item=&'a Self>) -> Self
where
Self: 'a
{
Self(annotations.fold(0, |curr, c| curr + c.0))
}
}
let mut tree = Tree::
let n_leaves = 1000;
for i in 0..n_leaves { tree.push(i).unwrap(); }
asserteq!(tree.len(), nleaves); asserteq!(tree.root().0, nleaves); ```