pub trait TrieCursorFactory {
type AccountTrieCursor<'a>: TrieCursor
where Self: 'a;
type StorageTrieCursor<'a>: TrieStorageCursor
where Self: 'a;
// Required methods
fn account_trie_cursor(
&self,
) -> Result<Self::AccountTrieCursor<'_>, DatabaseError>;
fn storage_trie_cursor(
&self,
hashed_address: B256,
) -> Result<Self::StorageTrieCursor<'_>, DatabaseError>;
}Expand description
Factory for creating trie cursors.
Required Associated Types§
Sourcetype AccountTrieCursor<'a>: TrieCursor
where
Self: 'a
type AccountTrieCursor<'a>: TrieCursor where Self: 'a
The account trie cursor type.
Sourcetype StorageTrieCursor<'a>: TrieStorageCursor
where
Self: 'a
type StorageTrieCursor<'a>: TrieStorageCursor where Self: 'a
The storage trie cursor type.
Required Methods§
Sourcefn account_trie_cursor(
&self,
) -> Result<Self::AccountTrieCursor<'_>, DatabaseError>
fn account_trie_cursor( &self, ) -> Result<Self::AccountTrieCursor<'_>, DatabaseError>
Create an account trie cursor.
Sourcefn storage_trie_cursor(
&self,
hashed_address: B256,
) -> Result<Self::StorageTrieCursor<'_>, DatabaseError>
fn storage_trie_cursor( &self, hashed_address: B256, ) -> Result<Self::StorageTrieCursor<'_>, DatabaseError>
Create a storage tries cursor.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<'b, T: 'b + TrieCursorFactory + ?Sized> TrieCursorFactory for &'b T
impl<'b, T: 'b + TrieCursorFactory + ?Sized> TrieCursorFactory for &'b T
type AccountTrieCursor<'a> = <T as TrieCursorFactory>::AccountTrieCursor<'a> where Self: 'a
type StorageTrieCursor<'a> = <T as TrieCursorFactory>::StorageTrieCursor<'a> where Self: 'a
fn account_trie_cursor( &self, ) -> Result<Self::AccountTrieCursor<'_>, DatabaseError>
fn storage_trie_cursor( &self, hashed_address: B256, ) -> Result<Self::StorageTrieCursor<'_>, DatabaseError>
Implementors§
Source§impl TrieCursorFactory for MockTrieCursorFactory
Available on crate features test-utils only.
impl TrieCursorFactory for MockTrieCursorFactory
Available on crate features
test-utils only.