HashedCursorFactory

Trait HashedCursorFactory 

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

    // Required methods
    fn hashed_account_cursor(
        &self,
    ) -> Result<Self::AccountCursor<'_>, DatabaseError>;
    fn hashed_storage_cursor(
        &self,
        hashed_address: B256,
    ) -> Result<Self::StorageCursor<'_>, DatabaseError>;
}
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 = U256> 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: B256, ) -> 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: 'b + HashedCursorFactory + ?Sized> HashedCursorFactory for &'b T

Source§

type AccountCursor<'a> = <T as HashedCursorFactory>::AccountCursor<'a> where Self: 'a

Source§

type StorageCursor<'a> = <T as HashedCursorFactory>::StorageCursor<'a> where Self: 'a

Source§

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

Source§

fn hashed_storage_cursor( &self, hashed_address: B256, ) -> Result<Self::StorageCursor<'_>, DatabaseError>

Implementors§

Source§

impl HashedCursorFactory for NoopHashedCursorFactory

Source§

type AccountCursor<'a> = NoopHashedCursor<Account> where Self: 'a

Source§

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

Source§

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

Source§

type AccountCursor<'cursor> = HashedPostStateCursor<'overlay, <CF as HashedCursorFactory>::AccountCursor<'cursor>, Option<Account>> where Self: 'cursor

Source§

type StorageCursor<'cursor> = HashedPostStateCursor<'overlay, <CF as HashedCursorFactory>::StorageCursor<'cursor>, Uint<256, 4>> where Self: 'cursor