Trait prometheus_utils::GuardedGauge
source · [−]pub trait GuardedGauge<P: Atomic + 'static> {
fn guarded_inc(&'static self) -> GenericGaugeGuard<P>;
fn guarded_add(&'static self, v: P::T) -> GenericGaugeGuard<P>;
}
Expand description
An extension trait for GenericGauge
to provide methods for temporarily modifying a gauge.
Required Methods
sourcefn guarded_inc(&'static self) -> GenericGaugeGuard<P>
fn guarded_inc(&'static self) -> GenericGaugeGuard<P>
Increase the gauge by 1 while the guard exists.
sourcefn guarded_add(&'static self, v: P::T) -> GenericGaugeGuard<P>
fn guarded_add(&'static self, v: P::T) -> GenericGaugeGuard<P>
Increase the gauge by the given increment while the guard exists.