Trait HashedCursor
pub trait HashedCursor {
type Value: Debug;
// Required methods
fn seek(
&mut self,
key: FixedBytes<32>,
) -> Result<Option<(FixedBytes<32>, Self::Value)>, DatabaseError>;
fn next(
&mut self,
) -> Result<Option<(FixedBytes<32>, Self::Value)>, DatabaseError>;
}
Available on crate feature
trie
only.Expand description
The cursor for iterating over hashed entries.
Required Associated Types§
Required Methods§
fn seek(
&mut self,
key: FixedBytes<32>,
) -> Result<Option<(FixedBytes<32>, Self::Value)>, DatabaseError>
fn seek( &mut self, key: FixedBytes<32>, ) -> Result<Option<(FixedBytes<32>, Self::Value)>, DatabaseError>
Seek an entry greater or equal to the given key and position the cursor there. Returns the first entry with the key greater or equal to the sought key.
fn next(
&mut self,
) -> Result<Option<(FixedBytes<32>, Self::Value)>, DatabaseError>
fn next( &mut self, ) -> Result<Option<(FixedBytes<32>, Self::Value)>, DatabaseError>
Move the cursor to the next entry and return it.