HashedCursorFactory

Trait HashedCursorFactory 

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

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

Source

type AccountCursor<'a>: HashedCursor<Value = Account> where Self: 'a

The hashed account cursor type.

Source

type StorageCursor<'a>: HashedStorageCursor<Value = Uint<256, 4>> where Self: 'a

The hashed storage cursor type.

Required Methods§

Source

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

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

Source

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'b, T> HashedCursorFactory for &'b T
where T: 'b + HashedCursorFactory + ?Sized,

Implementors§

Source§

impl HashedCursorFactory for NoopHashedCursorFactory

Source§

impl<'overlay, CF, T> HashedCursorFactory for HashedPostStateCursorFactory<CF, &'overlay T>

Source§

impl<Provider> HashedCursorFactory for OverlayStateProvider<Provider>
where Provider: DBProvider,

Source§

impl<TX> HashedCursorFactory for DatabaseHashedCursorFactory<&TX>
where TX: DbTx,