reth_provider

Trait StatsReader

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§

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].

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§

§

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

§

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

§

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

§

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

Implementors§