pub struct CounterGuard { /* private fields */ }Expand description
Increments a Counter metric when dropped.
Can be used to ensure that counters are incremented regardless of the control flow. For example, if a function returns early, the metric will still be incremented.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CounterGuard
impl !RefUnwindSafe for CounterGuard
impl Send for CounterGuard
impl Sync for CounterGuard
impl Unpin for CounterGuard
impl !UnwindSafe for CounterGuard
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