Trait prometheus_utils::GuardedGauge [−][src]
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
fn guarded_inc(&'static self) -> GenericGaugeGuard<P>
fn guarded_inc(&'static self) -> GenericGaugeGuard<P>
Increase the gauge by 1 while the guard exists.
fn 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.