pub trait MetricVec: Sealed {
type Metric: Metric;
// Required method
fn get_metric_with<S: BuildHasher>(
&self,
labels: &HashMap<&str, &str, S>,
) -> Result<Self::Metric>;
}Expand description
Required Associated Types§
Sourcetype Metric: Metric
type Metric: Metric
Type of prometheus::Metrics forming this MetricVec.
Required Methods§
Sourcefn get_metric_with<S: BuildHasher>(
&self,
labels: &HashMap<&str, &str, S>,
) -> Result<Self::Metric>
fn get_metric_with<S: BuildHasher>( &self, labels: &HashMap<&str, &str, S>, ) -> Result<Self::Metric>
Calls prometheus::MetricVec::get_metric_with() method of this
MetricVec.
§Errors
If a prometheus::Metric cannot be identified or created for the
provided label values.
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.