pub struct GaugeGuard<'a> { /* private fields */ }Expand description
Creates a RAII guard for a simple gauge metric.
The metric is incremented when the guard is created and decremented when it is dropped.
Implementations§
Source§impl<'a> GaugeGuard<'a>
impl<'a> GaugeGuard<'a>
pub fn new(metric: &'a SimpleGauge, by: f64) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GaugeGuard<'a>
impl<'a> RefUnwindSafe for GaugeGuard<'a>
impl<'a> Send for GaugeGuard<'a>
impl<'a> Sync for GaugeGuard<'a>
impl<'a> Unpin for GaugeGuard<'a>
impl<'a> UnwindSafe for GaugeGuard<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more