/// Formats a metric across all instances of `EosMetrics` in the registry.
Formats a metric across all instances of `EosMetrics` in the registry.
Formats a metric across all instances of ` EosMetrics ` in the registry .
fn fmt_eos_by<N, M>(
        inner: &Inner<K>,
        f: &mut fmt::Formatter<'_>,
        metric: Metric<'_, N, M>,
        get_metric: impl Fn(&EosMetrics) -> &M,
    ) -> fmt::Result
    where
        N: fmt::Display,
        M: FmtMetric,
    {
        for (key, metrics) in inner.iter() {
            let by_eos = (*metrics).by_eos.lock();
            for (eos, m) in by_eos.metrics.iter() {
                get_metric(&*m).fmt_metric_labeled(f, &metric.name, (key, eos))?;
            }
        }
        Ok(())
    }
fn fmt_eos_by < N , M > ( inner : & Inner < K > , f : & mut fmt :: Formatter < ' _ > , metric : Metric < ' _ , N , M > , get_metric : impl Fn ( & EosMetrics ) -> & M , ) -> fmt :: Result where N : fmt :: Display , M : FmtMetric , { for ( key , metrics ) in inner . iter ( ) { let by_eos = ( * metrics ) . by_eos . lock ( ) ; for ( eos , m ) in by_eos . metrics . iter ( ) { get_metric ( & * m ) . fmt_metric_labeled ( f , & metric . name , ( key , eos ) ) ? ; } } Ok ( ( ) ) }
Formats a metric across all instances of `EosMetrics` in the registry.
Formats a metric across all instances of ` EosMetrics ` in the registry .
inner
&Inner<K>
f
&mut fmt::Formatter<'_>
metric
Metric<'_, N, M>
get_metric
impl Fn(&EosMetrics) -> &M