Trait TrieCursorFactory
pub trait TrieCursorFactory {
type AccountTrieCursor: TrieCursor;
type StorageTrieCursor: TrieCursor;
// Required methods
fn account_trie_cursor(
&self,
) -> Result<Self::AccountTrieCursor, DatabaseError>;
fn storage_trie_cursor(
&self,
hashed_address: FixedBytes<32>,
) -> Result<Self::StorageTrieCursor, DatabaseError>;
}
Available on crate feature
trie
only.Expand description
Factory for creating trie cursors.
Required Associated Types§
type AccountTrieCursor: TrieCursor
type AccountTrieCursor: TrieCursor
The account trie cursor type.
type StorageTrieCursor: TrieCursor
type StorageTrieCursor: TrieCursor
The storage trie cursor type.
Required Methods§
fn account_trie_cursor(&self) -> Result<Self::AccountTrieCursor, DatabaseError>
fn account_trie_cursor(&self) -> Result<Self::AccountTrieCursor, DatabaseError>
Create an account trie cursor.
fn storage_trie_cursor(
&self,
hashed_address: FixedBytes<32>,
) -> Result<Self::StorageTrieCursor, DatabaseError>
fn storage_trie_cursor( &self, hashed_address: FixedBytes<32>, ) -> Result<Self::StorageTrieCursor, DatabaseError>
Create a storage tries cursor.
Implementations on Foreign Types§
§impl<'a, T> TrieCursorFactory for &'a Twhere
T: 'a + TrieCursorFactory + ?Sized,
impl<'a, T> TrieCursorFactory for &'a Twhere
T: 'a + TrieCursorFactory + ?Sized,
type AccountTrieCursor = <T as TrieCursorFactory>::AccountTrieCursor
type StorageTrieCursor = <T as TrieCursorFactory>::StorageTrieCursor
fn account_trie_cursor( &self, ) -> Result<<&'a T as TrieCursorFactory>::AccountTrieCursor, DatabaseError>
fn storage_trie_cursor( &self, hashed_address: FixedBytes<32>, ) -> Result<<&'a T as TrieCursorFactory>::StorageTrieCursor, DatabaseError>
§impl<TX> TrieCursorFactory for DatabaseTrieCursorFactory<'_, TX>where
TX: DbTx,
Implementation of the trie cursor factory for a database transaction.
impl<TX> TrieCursorFactory for DatabaseTrieCursorFactory<'_, TX>where
TX: DbTx,
Implementation of the trie cursor factory for a database transaction.