microkelvin
Library for creating and searching through annotated merkle trees.
Built on the canonical serialization and FFI library.
Compound trait
/// Trait for compound datastructures
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.
Annotation trait
The annotation trait keeps annotations of subtrees, for example total leaf amount (Cardinality in reference implementation), or which leaf compares the greatest (Max in reference implementation)
Branch walking
This is ane example of walking a recursive structure to yieald a branch pointing at a specific leaf.
It i implemented on any type implementing Compound whose annotation can be borrowed as Cardinality. Giving this capability to any such structure.
usage
Please check out the nstack implementation of a stack/vector type for a more advanced example.