[][src]Function reference_trie::encode_compact

pub fn encode_compact<L>(
    db: &TrieDB<L>
) -> Result<Vec<Vec<u8>>, Box<TrieError<<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error>>> where
    L: TrieLayout

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.

This function makes the assumption that all child references in an inline trie node are inline references.