/// Formats a metric across all instances of `Metrics` in the registry.
Formats a metric across all instances of `Metrics` in the registry.
Formats a metric across all instances of ` Metrics ` in the registry .
pub fn fmt_by<N, M>(
        &self,
        f: &mut fmt::Formatter<'_>,
        metric: Metric<'_, N, M>,
        get_metric: impl Fn(&V) -> &M,
    ) -> fmt::Result
    where
        K: FmtLabels,
        N: fmt::Display,
        M: FmtMetric,
    {
        for (key, m) in self.iter() {
            get_metric(&*m).fmt_metric_labeled(f, &metric.name, key)?;
        }
        Ok(())
    }
pub fn fmt_by < N , M > ( & self , f : & mut fmt :: Formatter < ' _ > , metric : Metric < ' _ , N , M > , get_metric : impl Fn ( & V ) -> & M , ) -> fmt :: Result where K : FmtLabels , N : fmt :: Display , M : FmtMetric , { for ( key , m ) in self . iter ( ) { get_metric ( & * m ) . fmt_metric_labeled ( f , & metric . name , key ) ? ; } Ok ( ( ) ) }
Formats a metric across all instances of `Metrics` in the registry.
Formats a metric across all instances of ` Metrics ` in the registry .
&self
f
&mut fmt::Formatter<'_>
metric
Metric<'_, N, M>
get_metric
impl Fn(&V) -> &M