StorageTrieWriter

Trait StorageTrieWriter 

Source
pub trait StorageTrieWriter: Send {
    // Required method
    fn write_storage_trie_updates_sorted<'a>(
        &self,
        storage_tries: impl Iterator<Item = (&'a FixedBytes<32>, &'a StorageTrieUpdatesSorted)>,
    ) -> Result<usize, ProviderError>;
}
Available on crate feature storage-api only.
Expand description

Storage Trie Writer

Required Methods§

Source

fn write_storage_trie_updates_sorted<'a>( &self, storage_tries: impl Iterator<Item = (&'a FixedBytes<32>, &'a StorageTrieUpdatesSorted)>, ) -> Result<usize, ProviderError>

Writes storage trie updates from the given storage trie map with already sorted updates.

Expects the storage trie updates to already be sorted by the hashed address key.

Returns the number of entries modified.

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> StorageTrieWriter for &'b T
where T: 'b + StorageTrieWriter + ?Sized, &'b T: Send,

Source§

fn write_storage_trie_updates_sorted<'a>( &self, storage_tries: impl Iterator<Item = (&'a FixedBytes<32>, &'a StorageTrieUpdatesSorted)>, ) -> Result<usize, ProviderError>

Source§

impl<T> StorageTrieWriter for Box<T>
where T: StorageTrieWriter + ?Sized, Box<T>: Send,

Source§

fn write_storage_trie_updates_sorted<'a>( &self, storage_tries: impl Iterator<Item = (&'a FixedBytes<32>, &'a StorageTrieUpdatesSorted)>, ) -> Result<usize, ProviderError>

Implementors§

Source§

impl<TX, N> StorageTrieWriter for DatabaseProvider<TX, N>
where TX: DbTxMut + DbTx + 'static, N: NodeTypes,