[][src]Struct trie_db::TrieFactory

pub struct TrieFactory<H: Hasher, C: NodeCodec<H>> { /* fields omitted */ }

Trie factory.

Methods

impl<'db, H, C> TrieFactory<H, C> where
    H: Hasher,
    C: NodeCodec<H> + 'db, 
[src]

pub fn new(spec: TrieSpec) -> Self[src]

Creates new factory.

pub fn readonly(
    &self,
    db: &'db dyn HashDBRef<H, DBValue>,
    root: &'db H::Out
) -> Result<TrieKinds<'db, H, C>, H::Out, <C as NodeCodec<H>>::Error>
[src]

Create new immutable instance of Trie.

pub fn create(
    &self,
    db: &'db mut dyn HashDB<H, DBValue>,
    root: &'db mut H::Out
) -> Box<dyn TrieMut<H, C> + 'db>
[src]

Create new mutable instance of Trie.

pub fn from_existing(
    &self,
    db: &'db mut dyn HashDB<H, DBValue>,
    root: &'db mut H::Out
) -> Result<Box<dyn TrieMut<H, C> + 'db>, H::Out, <C as NodeCodec<H>>::Error>
[src]

Create new mutable instance of trie and check for errors.

pub fn is_fat(&self) -> bool[src]

Returns true iff the trie DB is a fat DB (allows enumeration of keys).

Trait Implementations

impl<H: Clone + Hasher, C: Clone + NodeCodec<H>> Clone for TrieFactory<H, C>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<H: Default + Hasher, C: Default + NodeCodec<H>> Default for TrieFactory<H, C>[src]

Auto Trait Implementations

impl<H, C> Send for TrieFactory<H, C> where
    C: Send

impl<H, C> Sync for TrieFactory<H, C> where
    C: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.