microkelvin
Crate for creating and traversing recursively annotated structures.
Compound trait
/// A type that can recursively contain itself and leaves.
The Compound
trait defines a type as a collection type. This means that it
can be searched and have branches constructed pointing to its elements.
Branch walking
The Walker
trait can be implemented for walking the tree in a user defined
way. As an example, here's AllLeaves
- an implementation used internally:
/// Walker that visits all leaves
;
Usage
Please check out the nstack implementation of a stack/vector type for a more advanced example.