[][src]Struct prometheus::core::GenericLocalCounter

pub struct GenericLocalCounter<P: Atomic> { /* fields omitted */ }

The underlying implementation for LocalCounter and LocalIntCounter.

Methods

impl<P: Atomic> GenericLocalCounter<P>
[src]

pub fn inc_by(&mut self, v: P::T)
[src]

Increase the given value to the local counter.

Panics

Panics in debug build if the value is < 0.

pub fn inc(&mut self)
[src]

Increase the local counter by 1.

pub fn get(&self) -> P::T
[src]

Return the local counter value.

pub fn flush(&mut self)
[src]

Flush the local metrics to the Counter.

Trait Implementations

impl<P: Atomic> Clone for GenericLocalCounter<P>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<P> Send for GenericLocalCounter<P> where
    <P as Atomic>::T: Send

impl<P> Sync for GenericLocalCounter<P> where
    <P as Atomic>::T: Sync

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]