reth_provider/traits/
trie.rsuse std::collections::HashMap;
use alloy_primitives::B256;
use auto_impl::auto_impl;
use reth_storage_errors::provider::ProviderResult;
use reth_trie::updates::{StorageTrieUpdates, TrieUpdates};
#[auto_impl(&, Arc, Box)]
pub trait TrieWriter: Send + Sync {
fn write_trie_updates(&self, trie_updates: &TrieUpdates) -> ProviderResult<usize>;
}
#[auto_impl(&, Arc, Box)]
pub trait StorageTrieWriter: Send + Sync {
fn write_storage_trie_updates(
&self,
storage_tries: &HashMap<B256, StorageTrieUpdates>,
) -> ProviderResult<usize>;
fn write_individual_storage_trie_updates(
&self,
hashed_address: B256,
updates: &StorageTrieUpdates,
) -> ProviderResult<usize>;
}