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.type AccountTrieCursor<'a> = MockTrieCursor where Self: 'a
type StorageTrieCursor<'a> = MockTrieCursor where Self: 'a
Source§impl TrieCursorFactory for NoopTrieCursorFactory
impl TrieCursorFactory for NoopTrieCursorFactory
type AccountTrieCursor<'a> = NoopAccountTrieCursor where Self: 'a
type StorageTrieCursor<'a> = NoopStorageTrieCursor where Self: 'a
Source§impl<'overlay, CF, T> TrieCursorFactory for InMemoryTrieCursorFactory<CF, &'overlay T>
impl<'overlay, CF, T> TrieCursorFactory for InMemoryTrieCursorFactory<CF, &'overlay T>
type AccountTrieCursor<'cursor> = InMemoryTrieCursor<'overlay, <CF as TrieCursorFactory>::AccountTrieCursor<'cursor>> where Self: 'cursor
type StorageTrieCursor<'cursor> = InMemoryTrieCursor<'overlay, <CF as TrieCursorFactory>::StorageTrieCursor<'cursor>> where Self: 'cursor
Source§impl<F: TrieCursorFactory> TrieCursorFactory for InstrumentedTrieCursorFactory<F>
Available on crate feature metrics only.
impl<F: TrieCursorFactory> TrieCursorFactory for InstrumentedTrieCursorFactory<F>
Available on crate feature
metrics only.