pub trait StorageIterator<H>where
    H: Hasher,{
    type Backend;
    type Error;

    // Required methods
    fn next_key(
        &mut self,
        backend: &Self::Backend
    ) -> Option<Result<StorageKey, Self::Error>>;
    fn next_pair(
        &mut self,
        backend: &Self::Backend
    ) -> Option<Result<(StorageKey, StorageValue), Self::Error>>;
    fn was_complete(&self) -> bool;
}
Expand description

A trait for a raw storage iterator.

Required Associated Types§

source

type Backend

The state backend over which the iterator is iterating.

source

type Error

The error type.

Required Methods§

source

fn next_key( &mut self, backend: &Self::Backend ) -> Option<Result<StorageKey, Self::Error>>

Fetches the next key from the storage.

source

fn next_pair( &mut self, backend: &Self::Backend ) -> Option<Result<(StorageKey, StorageValue), Self::Error>>

Fetches the next key and value from the storage.

source

fn was_complete(&self) -> bool

Returns whether the end of iteration was reached without an error.

Implementors§