[−][src]Module merk::tree
The core tree data structure.
Structs
NoopCommit | A |
PanicSource | A source of data which panics when called. Useful when creating a store which always keeps the state in memory. |
RefWalker | Allows read-only traversal of a |
Tree | A binary AVL tree data structure, with Merkle hashes. |
Walker | Allows traversal of a |
Enums
Link | Represents a reference to a child tree node. Links may or may not contain
the child's |
Op | An operation to be applied to a key in the store. |
Constants
HASH_LENGTH | The length of a |
NULL_HASH | A zero-filled |
Traits
Commit | To be used when committing a tree (writing it to a store after applying the changes). |
Fetch | A source of data to be used by the tree when encountering a pruned node. This typcially means fetching the tree node from a backing store by its key, but could also implement an in-memory cache for example. |
Functions
kv_hash | Hashes a key/value pair. |
node_hash | Hashes a node based on the hash of its key/value pair, the hash of its left child (if any), and the hash of its right child (if any). |
side_to_str |
Type Definitions
Batch | A mapping of keys and operations. Keys should be sorted and unique. |
BatchEntry | A single |
Hash | A cryptographic hash digest. |