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§
Sourcefn 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 than or equal to the given key and position the cursor there. Returns the first entry with the key greater than or equal to the sought key.
Sourcefn 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.