reth_storage_api/
stats.rs

1use reth_db_api::table::Table;
2use reth_storage_errors::provider::ProviderResult;
3
4/// The trait for fetching provider statistics.
5#[auto_impl::auto_impl(&, Arc)]
6pub trait StatsReader: Send + Sync {
7    /// Fetch the number of entries in the corresponding [Table]. Depending on the provider, it may
8    /// route to different data sources other than [Table].
9    fn count_entries<T: Table>(&self) -> ProviderResult<usize>;
10}