pub fn encode_compact<L>(
db: &TrieDB<'_, '_, L>,
) -> Result<Vec<Vec<u8>>, TrieHash<L>, CError<L>>where
L: TrieLayout,Expand description
Generates a compact representation of the partial trie stored in the given DB. The encoding is a vector of mutated trie nodes with those child references omitted. The mutated trie nodes are listed in pre-order traversal order so that the full nodes can be efficiently reconstructed recursively.
A shared detached value node is emitted once per referencing node and a duplicated subtree
once per occurrence (see encode_compact_skip_duplicates).
This function makes the assumption that all child references in an inline trie node are inline references.