Trait TrieLayout

Source
pub trait TrieLayout {
    type Hash: Hasher;
    type Codec: NodeCodec<HashOut = <Self::Hash as Hasher>::Out>;

    const USE_EXTENSION: bool;
    const MAX_INLINE_VALUE: Option<u32>;
    const ALLOW_EMPTY: bool = false;
}
Expand description

Trait with definition of trie layout. Contains all associated trait needed for a trie definition or implementation.

Required Associated Constants§

Source

const USE_EXTENSION: bool

If true, the trie will use extension nodes and no partial in branch, if false the trie will only use branch and node with partials in both.

Source

const MAX_INLINE_VALUE: Option<u32>

Threshold above which an external node should be use to store a node value.

Provided Associated Constants§

Source

const ALLOW_EMPTY: bool = false

If true, the trie will allow empty values into TrieDBMut

Required Associated Types§

Source

type Hash: Hasher

Hasher to use for this trie.

Source

type Codec: NodeCodec<HashOut = <Self::Hash as Hasher>::Out>

Codec to use (needs to match hasher and nibble ops).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§