Trait sp_state_machine::backend::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§
Required Methods§
sourcefn next_key(
&mut self,
backend: &Self::Backend,
) -> Option<Result<StorageKey, Self::Error>>
fn next_key( &mut self, backend: &Self::Backend, ) -> Option<Result<StorageKey, Self::Error>>
Fetches the next key from the storage.
sourcefn next_pair(
&mut self,
backend: &Self::Backend,
) -> Option<Result<(StorageKey, StorageValue), Self::Error>>
fn next_pair( &mut self, backend: &Self::Backend, ) -> Option<Result<(StorageKey, StorageValue), Self::Error>>
Fetches the next key and value from the storage.
sourcefn was_complete(&self) -> bool
fn was_complete(&self) -> bool
Returns whether the end of iteration was reached without an error.