TrieBuilder

Struct TrieBuilder 

Source
pub struct TrieBuilder<'a, H, HO, V, DB> {
    pub root: Option<HO>,
    /* private fields */
}
Expand description

Get trie root and insert visited node in a tetsy_hash_db. As for all ProcessEncodedNode implementation, it is only for full trie parsing (not existing trie).

Fields§

§root: Option<HO>

Implementations§

Source§

impl<'a, H, HO, V, DB> TrieBuilder<'a, H, HO, V, DB>

Source

pub fn new(db: &'a mut DB) -> Self

Trait Implementations§

Source§

impl<'a, H: Hasher, V, DB: HashDB<H, V>> ProcessEncodedNode<<H as Hasher>::Out> for TrieBuilder<'a, H, <H as Hasher>::Out, V, DB>

Source§

fn process( &mut self, prefix: Prefix<'_>, encoded_node: Vec<u8>, is_root: bool, ) -> ChildReference<<H as Hasher>::Out>

Function call with prefix, encoded value and a boolean indicating if the node is the root for each node of the trie. Read more

Auto Trait Implementations§

§

impl<'a, H, HO, V, DB> Freeze for TrieBuilder<'a, H, HO, V, DB>
where HO: Freeze,

§

impl<'a, H, HO, V, DB> RefUnwindSafe for TrieBuilder<'a, H, HO, V, DB>

§

impl<'a, H, HO, V, DB> Send for TrieBuilder<'a, H, HO, V, DB>
where DB: Send, HO: Send, H: Send, V: Send,

§

impl<'a, H, HO, V, DB> Sync for TrieBuilder<'a, H, HO, V, DB>
where DB: Sync, HO: Sync, H: Sync, V: Sync,

§

impl<'a, H, HO, V, DB> Unpin for TrieBuilder<'a, H, HO, V, DB>
where HO: Unpin, H: Unpin, V: Unpin,

§

impl<'a, H, HO, V, DB> !UnwindSafe for TrieBuilder<'a, H, HO, V, DB>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.