Trait prometheus::local::CounterDelegator
source · pub trait CounterDelegator<T: 'static + MayFlush, V: CounterWithValueType> {
// Required methods
fn get_root_metric(&self) -> &'static LocalKey<T>;
fn get_local<'a>(
&self,
root_metric: &'a T,
) -> &'a GenericLocalCounter<V::ValueType>;
}
Expand description
Delegator for auto flush-able local counter
Required Methods§
sourcefn get_root_metric(&self) -> &'static LocalKey<T>
fn get_root_metric(&self) -> &'static LocalKey<T>
Get the root local metric for delegate
sourcefn get_local<'a>(
&self,
root_metric: &'a T,
) -> &'a GenericLocalCounter<V::ValueType>
fn get_local<'a>( &self, root_metric: &'a T, ) -> &'a GenericLocalCounter<V::ValueType>
Get the final counter for delegate