pub trait BaselineStore: Send + Sync {
// Required methods
fn put<'life0, 'async_trait>(
&'life0 self,
baseline: EntityBaseline,
) -> Pin<Box<dyn Future<Output = Result<(), BaselineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
metric: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<EntityBaseline, BaselineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn contains<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
metric: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Storage contract for entity/metric baselines.
Required Methods§
Sourcefn put<'life0, 'async_trait>(
&'life0 self,
baseline: EntityBaseline,
) -> Pin<Box<dyn Future<Output = Result<(), BaselineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 self,
baseline: EntityBaseline,
) -> Pin<Box<dyn Future<Output = Result<(), BaselineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert or replace a baseline.
Sourcefn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
metric: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<EntityBaseline, BaselineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
metric: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<EntityBaseline, BaselineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fetch one baseline by entity and metric.
Sourcefn contains<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
metric: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn contains<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
metric: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Return true when a baseline exists for entity and metric.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".