Enum metrics_prometheus::metric::bundle::Either
source · pub enum Either<Single, Vec> {
Single(Single),
Vec(Vec),
}Expand description
Either a single prometheus::Metric or a prometheus::MetricVec of
them, forming a Bundle.
Variants§
Trait Implementations§
source§impl<M, B> Bundle for Either<M, MetricVec<B>>where
M: Metric + Clone,
B: MetricVecBuilder<M = M>,
impl<M, B> Bundle for Either<M, MetricVec<B>>where M: Metric + Clone, B: MetricVecBuilder<M = M>,
§type Single = M
type Single = M
Type of a single
prometheus::Metric that may be stored in this
Bundle.§type Vec = MetricVec<B>
type Vec = MetricVec<B>
Type of a
prometheus::MetricVec that may be stored in this
Bundle.source§fn get_single_metric(&self, key: &Key) -> Result<M>
fn get_single_metric(&self, key: &Key) -> Result<M>
Returns a single
prometheus::Metric of this Bundle,
identified by the provided metrics::Key. Read more