Struct sp_trie::TrieDBIterator[][src]

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

Various re-exports from the trie-db crate. Iterator for going through all values in the trie in pre-order traversal order.

Implementations

impl<'a, L> TrieDBIterator<'a, L> where
    L: TrieLayout
[src]

Various re-exports from the trie-db crate.

pub fn new(
    db: &'a TrieDB<'_, L>
) -> Result<TrieDBIterator<'a, L>, Box<TrieError<<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error>, Global>>
[src]

Create a new iterator.

pub fn new_prefixed(
    db: &'a TrieDB<'_, L>,
    prefix: &[u8]
) -> Result<TrieDBIterator<'a, L>, Box<TrieError<<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error>, Global>>
[src]

Create a new iterator, but limited to a given prefix.

Trait Implementations

impl<'a, L> Iterator for TrieDBIterator<'a, L> where
    L: TrieLayout
[src]

type Item = Result<(Vec<u8, Global>, Vec<u8, Global>), Box<TrieError<<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error>, Global>>

The type of the elements being iterated over.

impl<'a, L> TrieIterator<L> for TrieDBIterator<'a, L> where
    L: TrieLayout
[src]

pub fn seek(
    &mut self,
    key: &[u8]
) -> Result<(), Box<TrieError<<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error>, Global>>
[src]

Position the iterator on the first element with key >= key

Auto Trait Implementations

impl<'a, L> !RefUnwindSafe for TrieDBIterator<'a, L>[src]

impl<'a, L> !Send for TrieDBIterator<'a, L>[src]

impl<'a, L> !Sync for TrieDBIterator<'a, L>[src]

impl<'a, L> Unpin for TrieDBIterator<'a, L> where
    <<L as TrieLayout>::Hash as Hasher>::Out: Unpin
[src]

impl<'a, L> !UnwindSafe for TrieDBIterator<'a, L>[src]

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> Instrument for T[src]

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,