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]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> 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,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,