Expand description
Database of byte-slices keyed to their hash.
Statics§
- EMPTY_
PREFIX - An empty prefix constant. Can be use when the prefix is not use internally or for root nodes.
Traits§
- AsHashDB
- Upcast trait for HashDB.
- AsPlainDB
- Upcast trait for PlainDB.
- HashDB
- Trait modelling datastore keyed by a hash defined by the
Hasher
. - HashDB
Ref - Trait for immutable reference of HashDB.
- Hasher
- Trait describing an object that can hash a slice of bytes. Used to abstract
other types over the hashing algorithm. Defines a single
hash
method and anOut
associated type with the necessary bounds. - Maybe
Debug - PlainDB
- Trait modelling a plain datastore whose key is a fixed type. The caller should ensure that a key only corresponds to one value.
- PlainDB
Ref - Trait for immutable reference of PlainDB.
Type Aliases§
- Prefix
- A trie node prefix, it is the nibble path from the trie root to the trie node. For a node containing no partial key value it is the full key. For a value node or node containing a partial key, it is the full key minus its node partial nibbles (the node key can be split into prefix and node partial). Therefore it is always the leftmost portion of the node key, so its internal representation is a non expanded byte slice followed by a last padded byte representation. The padded byte is an optional padded value.