[−][src]Struct prometheus::core::GenericCounter
The underlying implementation for Counter
and IntCounter
.
Methods
impl<P: Atomic> GenericCounter<P>
[src]
impl<P: Atomic> GenericCounter<P>
pub fn new<S: Into<String>>(name: S, help: S) -> Result<Self> | [src] |
Create a GenericCounter
with the name
and help
arguments.
pub fn with_opts(opts: Opts) -> Result<Self> | [src] |
Create a GenericCounter
with the opts
options.
pub fn inc_by(&self, v: P::T) | [src] |
pub fn inc(&self) | [src] |
Increase the counter by 1.
pub fn get(&self) -> P::T | [src] |
Return the counter value.
pub fn local(&self) -> GenericLocalCounter<P> | [src] |
Return a GenericLocalCounter
for single thread usage.
Trait Implementations
impl<P: Atomic> Collector for GenericCounter<P>
[src]
impl<P: Atomic> Collector for GenericCounter<P>
impl<P: Atomic> Metric for GenericCounter<P>
[src]
impl<P: Atomic> Metric for GenericCounter<P>
impl<P: Atomic> Clone for GenericCounter<P>
[src]
impl<P: Atomic> Clone for GenericCounter<P>
fn clone(&self) -> Self | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl<P: Debug + Atomic> Debug for GenericCounter<P>
[src]
impl<P: Debug + Atomic> Debug for GenericCounter<P>
Auto Trait Implementations
impl<P> Send for GenericCounter<P>
impl<P> Send for GenericCounter<P>
impl<P> Sync for GenericCounter<P>
impl<P> Sync for GenericCounter<P>
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,