MetricsStorage

pub trait MetricsStorage: Debug {
    // Required methods
    fn store_metric<'life0, 'life1, 'async_trait>(
        &'life0 self,
        metric: &'life1 Metric,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn query_metrics<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 MetricsQuery,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Metric>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn aggregate_metrics<'life0, 'life1, 'async_trait>(
        &'life0 self,
        aggregation: &'life1 AggregationQuery,
    ) -> Pin<Box<dyn Future<Output = Result<AggregatedMetrics>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for metrics storage

Required Methods§

Source

fn store_metric<'life0, 'life1, 'async_trait>( &'life0 self, metric: &'life1 Metric, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn query_metrics<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 MetricsQuery, ) -> Pin<Box<dyn Future<Output = Result<Vec<Metric>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn aggregate_metrics<'life0, 'life1, 'async_trait>( &'life0 self, aggregation: &'life1 AggregationQuery, ) -> Pin<Box<dyn Future<Output = Result<AggregatedMetrics>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§