reth_trie::hashed_cursor

Trait HashedCursor

Source
pub trait HashedCursor {
    type Value: Debug;

    // Required methods
    fn seek(
        &mut self,
        key: B256,
    ) -> Result<Option<(B256, Self::Value)>, DatabaseError>;
    fn next(&mut self) -> Result<Option<(B256, Self::Value)>, DatabaseError>;
}
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: B256, ) -> Result<Option<(B256, 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.

Source

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

Move the cursor to the next entry and return it.

Implementors§

Source§

impl HashedCursor for NoopHashedAccountCursor

Source§

type Value = Account

Source§

impl HashedCursor for NoopHashedStorageCursor

Source§

type Value = Uint<256, 4>

Source§

impl<C> HashedCursor for HashedPostStateAccountCursor<'_, C>
where C: HashedCursor<Value = Account>,

Source§

type Value = Account

Source§

impl<C> HashedCursor for HashedPostStateStorageCursor<'_, C>
where C: HashedStorageCursor<Value = U256>,

Source§

type Value = Uint<256, 4>