Trait HashedCursorFactory

pub trait HashedCursorFactory {
    type AccountCursor: HashedCursor<Value = Account>;
    type StorageCursor: HashedStorageCursor<Value = Uint<256, 4>>;

    // Required methods
    fn hashed_account_cursor(
        &self,
    ) -> Result<Self::AccountCursor, DatabaseError>;
    fn hashed_storage_cursor(
        &self,
        hashed_address: FixedBytes<32>,
    ) -> Result<Self::StorageCursor, DatabaseError>;
}
Available on crate feature trie only.
Expand description

The factory trait for creating cursors over the hashed state.

Required Associated Types§

type AccountCursor: HashedCursor<Value = Account>

The hashed account cursor type.

type StorageCursor: HashedStorageCursor<Value = Uint<256, 4>>

The hashed storage cursor type.

Required Methods§

fn hashed_account_cursor(&self) -> Result<Self::AccountCursor, DatabaseError>

Returns a cursor for iterating over all hashed accounts in the state.

fn hashed_storage_cursor( &self, hashed_address: FixedBytes<32>, ) -> Result<Self::StorageCursor, DatabaseError>

Returns a cursor for iterating over all hashed storage entries in the state.

Implementations on Foreign Types§

§

impl<TX> HashedCursorFactory for DatabaseHashedCursorFactory<'_, TX>
where TX: DbTx,

§

type AccountCursor = DatabaseHashedAccountCursor<<TX as DbTx>::Cursor<HashedAccounts>>

§

type StorageCursor = DatabaseHashedStorageCursor<<TX as DbTx>::DupCursor<HashedStorages>>

§

fn hashed_account_cursor( &self, ) -> Result<<DatabaseHashedCursorFactory<'_, TX> as HashedCursorFactory>::AccountCursor, DatabaseError>

§

fn hashed_storage_cursor( &self, hashed_address: FixedBytes<32>, ) -> Result<<DatabaseHashedCursorFactory<'_, TX> as HashedCursorFactory>::StorageCursor, DatabaseError>

Implementors§