Struct prometheus::core::GenericLocalCounter [−][src]
The underlying implementation for LocalCounter
and LocalIntCounter
.
Implementations
impl<P: Atomic> GenericLocalCounter<P>
[src][−]
pub fn inc_by(&self, v: P::T)
[src][−]
pub fn inc(&self)
[src][−]
Increase the local counter by 1.
pub fn get(&self) -> P::T
[src][−]
Return the local counter value.
pub fn reset(&self)
[src][−]
Restart the counter, resetting its value back to 0.
pub fn flush(&self)
[src][−]
Flush the local metrics to the Counter
.
Trait Implementations
impl<P: Atomic> Clone for GenericLocalCounter<P>
[src][+]
impl<P: Atomic> CounterWithValueType for GenericLocalCounter<P>
[src]
type ValueType = P
the exact type which implements Atomic
impl<P: Debug + Atomic> Debug for GenericLocalCounter<P> where
P::T: Debug,
[src][+]
P::T: Debug,
impl<P: Atomic> LocalMetric for GenericLocalCounter<P>
[src][+]
Auto Trait Implementations
impl<P> !RefUnwindSafe for GenericLocalCounter<P>
impl<P> Send for GenericLocalCounter<P>
impl<P> !Sync for GenericLocalCounter<P>
impl<P> Unpin for GenericLocalCounter<P> where
<P as Atomic>::T: Unpin,
<P as Atomic>::T: Unpin,
impl<P> UnwindSafe for GenericLocalCounter<P> where
P: RefUnwindSafe,
<P as Atomic>::T: UnwindSafe,
P: RefUnwindSafe,
<P as Atomic>::T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,