cfx_storage/impls/merkle_patricia_trie/
mod.rs1#[macro_use]
6pub(super) mod maybe_in_place_byte_array_macro;
7
8pub mod children_table;
9pub(super) mod compressed_path;
10pub(super) mod maybe_in_place_byte_array;
11pub mod merkle;
12pub mod mpt_cursor;
13pub mod mpt_merger;
14pub mod simple_mpt;
15pub mod trie_node;
16pub mod trie_proof;
17pub(super) mod walk;
18
19#[cfg(test)]
20mod tests;
21
22pub use self::{
23 children_table::*,
24 compressed_path::{
25 CompressedPathRaw, CompressedPathRef, CompressedPathTrait,
26 },
27 mpt_merger::MptMerger,
28 trie_node::{TrieNodeTrait, VanillaTrieNode},
29 trie_proof::TrieProof,
30};
31
32pub type MptKeyValue = (Vec<u8>, Box<[u8]>);
33
34pub trait KVInserter<Value> {
36 fn push(&mut self, v: Value) -> Result<()>;
37}
38
39impl<Value> KVInserter<Value> for Vec<Value> {
40 fn push(&mut self, v: Value) -> Result<()> { Ok((*self).push(v)) }
41}
42
43use super::errors::Result;