Struct trie_db::Lookup[][src]

pub struct Lookup<'a, L: TrieLayout, Q: Query<L::Hash>> {
    pub db: &'a dyn HashDBRef<L::Hash, DBValue>,
    pub query: Q,
    pub hash: TrieHash<L>,
}

Trie lookup helper object.

Fields

db: &'a dyn HashDBRef<L::Hash, DBValue>

database to query from.

query: Q

Query object to record nodes and transform data.

hash: TrieHash<L>

Hash to start at

Implementations

impl<'a, L, Q> Lookup<'a, L, Q> where
    L: TrieLayout,
    Q: Query<L::Hash>, 
[src]

pub fn look_up(
    self,
    key: NibbleSlice<'_>
) -> Result<Option<Q::Item>, TrieHash<L>, CError<L>>
[src]

Look up the given key. If the value is found, it will be passed to the given function to decode or copy.

Auto Trait Implementations

impl<'a, L, Q> !RefUnwindSafe for Lookup<'a, L, Q>

impl<'a, L, Q> !Send for Lookup<'a, L, Q>

impl<'a, L, Q> !Sync for Lookup<'a, L, Q>

impl<'a, L, Q> Unpin for Lookup<'a, L, Q> where
    Q: Unpin,
    <<L as TrieLayout>::Hash as Hasher>::Out: Unpin

impl<'a, L, Q> !UnwindSafe for Lookup<'a, L, Q>

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.