pub fn register_computed_gauge<F, P>(
        &self,
        opts: prometheus::Opts,
        f: F,
    ) -> ComputedGenericGauge<P>
    where
        F: Fn() -> P::T + Send + Sync + 'static,
        P: Atomic + 'static,
    {
        let gauge = ComputedGenericGauge {
            gauge: GenericGauge::make_collector(opts),
            f: Arc::new(f),
        };
        self.inner.register(Box::new(gauge.clone())).unwrap();
        gauge
    }
/// Registers a gauge whose value is computed when observed.
Registers a gauge whose value is computed when observed.
Registers a gauge whose value is computed when observed .
pub fn register_computed_gauge<F, P>(
        &self,
        opts: prometheus::Opts,
        f: F,
    ) -> ComputedGenericGauge<P>
    where
        F: Fn() -> P::T + Send + Sync + 'static,
        P: Atomic + 'static,
    {
        let gauge = ComputedGenericGauge {
            gauge: GenericGauge::make_collector(opts),
            f: Arc::new(f),
        };
        self.inner.register(Box::new(gauge.clone())).unwrap();
        gauge
    }
pub fn register_computed_gauge < F , P > ( & self , opts : prometheus :: Opts , f : F , ) -> ComputedGenericGauge < P > where F : Fn ( ) -> P :: T + Send + Sync + ' static , P : Atomic + ' static , { let gauge = ComputedGenericGauge { gauge : GenericGauge :: make_collector ( opts ) , f : Arc :: new ( f ) , } ; self . inner . register ( Box :: new ( gauge . clone ( ) ) ) . unwrap ( ) ; gauge }
Registers a gauge whose value is computed when observed.
Registers a gauge whose value is computed when observed .
&self
opts
prometheus::Opts
f
F
&self
opts
prometheus::Opts
f
F