Struct prometheus_utils::DeferredAdd
source · [−]pub struct DeferredAdd<'a, P: Atomic> { /* private fields */ }
Expand description
A guard that will automatically increment a GenericCounter
when dropped.
Created by the methods on the DeferredCounter
extension trait.
Implementations
sourceimpl<'a, P: Atomic> DeferredAdd<'a, P>
impl<'a, P: Atomic> DeferredAdd<'a, P>
sourcepub fn complete_add(self)
pub fn complete_add(self)
Eagerly perform the increment, consuming the guard.
Trait Implementations
sourceimpl<'a, P: Atomic> Drop for DeferredAdd<'a, P>
impl<'a, P: Atomic> Drop for DeferredAdd<'a, P>
When dropped, a DeferredAdd
guard will increment its counter.
Auto Trait Implementations
impl<'a, P> RefUnwindSafe for DeferredAdd<'a, P>where
P: RefUnwindSafe,
<P as Atomic>::T: RefUnwindSafe,
impl<'a, P> Send for DeferredAdd<'a, P>
impl<'a, P> Sync for DeferredAdd<'a, P>
impl<'a, P> Unpin for DeferredAdd<'a, P>where
<P as Atomic>::T: Unpin,
impl<'a, P> UnwindSafe for DeferredAdd<'a, P>where
P: RefUnwindSafe,
<P as Atomic>::T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more