Struct tetsy_trie_db::sectriedb::SecTrieDB[][src]

pub struct SecTrieDB<'db, L> where
    L: TrieLayout
{ /* fields omitted */ }

A Trie implementation which hashes keys and uses a generic HashDB backing database.

Use it as a Trie trait object. You can use raw() to get the backing TrieDB object.

Implementations

impl<'db, L> SecTrieDB<'db, L> where
    L: TrieLayout
[src]

pub fn new(
    db: &'db dyn HashDBRef<L::Hash, DBValue>,
    root: &'db TrieHash<L>
) -> Result<Self, TrieHash<L>, CError<L>>
[src]

Create a new trie with the backing database db and empty root

Initialise to the state entailed by the genesis block. This guarantees the trie is built correctly. Returns an error if root does not exist.

pub fn raw(&self) -> &TrieDB<'_, L>[src]

Get a reference to the underlying raw TrieDB struct.

pub fn raw_mut(&mut self) -> &mut TrieDB<'db, L>[src]

Get a mutable reference to the underlying raw TrieDB struct.

Trait Implementations

impl<'db, L> Trie<L> for SecTrieDB<'db, L> where
    L: TrieLayout
[src]

Auto Trait Implementations

impl<'db, L> !RefUnwindSafe for SecTrieDB<'db, L>

impl<'db, L> !Send for SecTrieDB<'db, L>

impl<'db, L> !Sync for SecTrieDB<'db, L>

impl<'db, L> Unpin for SecTrieDB<'db, L>

impl<'db, L> !UnwindSafe for SecTrieDB<'db, L>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.