Skip to main content

StorageIterator

Trait StorageIterator 

Source
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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§