Trait StatsReader

Source
pub trait StatsReader: Send + Sync {
    // Required method
    fn count_entries<T>(&self) -> Result<usize, ProviderError>
       where T: Table;
}
Available on crate feature provider only.
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.

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<'a, U> StatsReader for &'a U
where U: 'a + StatsReader + ?Sized, &'a U: Send + Sync,

Source§

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

Implementors§

Source§

impl<N> StatsReader for StaticFileProvider<N>
where N: NodePrimitives,

Source§

impl<TX, N> StatsReader for DatabaseProvider<TX, N>
where TX: DbTx + 'static, N: NodeTypesForProvider,