Trait trie_root::TrieStream [−][src]
Byte-stream oriented trait for constructing closed-form tries.
Required methods
fn new() -> Self
[src]
Construct a new TrieStream
fn append_empty_data(&mut self)
[src]
Append an Empty node
fn begin_branch(
&mut self,
maybe_key: Option<&[u8]>,
maybe_value: Option<&[u8]>,
has_children: impl Iterator<Item = bool>
)
[src]
&mut self,
maybe_key: Option<&[u8]>,
maybe_value: Option<&[u8]>,
has_children: impl Iterator<Item = bool>
)
Start a new Branch node, possibly with a value; takes a list indicating which slots in the Branch node has further child nodes.
fn append_leaf(&mut self, key: &[u8], value: &[u8])
[src]
Append a Leaf node
fn append_extension(&mut self, key: &[u8])
[src]
Append an Extension node
fn append_substream<H: Hasher>(&mut self, other: Self)
[src]
Append a Branch of Extension substream
fn out(self) -> Vec<u8>ⓘ
[src]
Return the finished TrieStream
as a vector of bytes.
Provided methods
fn append_empty_child(&mut self)
[src]
Append an empty child node. Optional.
fn end_branch(&mut self, _value: Option<&[u8]>)
[src]
Wrap up a Branch node portion of a TrieStream
and append the value
stored on the Branch (if any).