reth::providers

Trait StatsReader

source
pub trait StatsReader: Send + Sync {
    // Required method
    fn count_entries<T>(&self) -> Result<usize, ProviderError>
       where T: Table;
}
Expand description

The trait for fetching provider statistics.

Required Methods§

source

fn count_entries<T>(&self) -> Result<usize, ProviderError>
where T: Table,

Fetch the number of entries in the corresponding [Table]. Depending on the provider, it may route to different data sources other than [Table].

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, U> StatsReader for &'a U
where U: 'a + StatsReader + ?Sized, &'a U: Send + Sync,

source§

fn count_entries<T>(&self) -> Result<usize, ProviderError>
where T: Table,

source§

impl<U> StatsReader for Arc<U>
where U: StatsReader + ?Sized, Arc<U>: Send + Sync,

source§

fn count_entries<T>(&self) -> Result<usize, ProviderError>
where T: Table,

Implementors§

source§

impl StatsReader for StaticFileProvider

source§

impl<TX, Spec> StatsReader for DatabaseProvider<TX, Spec>
where TX: DbTx, Spec: Send + Sync,