HashedCursor

Trait HashedCursor 

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

Source

type Value: Debug

Value returned by the cursor.

Required Methods§

Source

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.

Source

fn next( &mut self, ) -> Result<Option<(FixedBytes<32>, Self::Value)>, DatabaseError>

Move the cursor to the next entry and return it.

Implementations on Foreign Types§

Source§

impl<'a, T> HashedCursor for &'a mut T
where T: 'a + HashedCursor + ?Sized,

Implementors§