[−][src]Struct prometheus::core::GenericGauge
Methods
impl<P: Atomic> GenericGauge<P>[src]
impl<P: Atomic> GenericGauge<P>pub fn new<S: Into<String>>(name: S, help: S) -> Result<Self> | [src] |
Create a GenericGauge with the name and help arguments.
pub fn with_opts(opts: Opts) -> Result<Self> | [src] |
Create a GenericGauge with the opts options.
pub fn set(&self, v: P::T) | [src] |
Set the gauge to an arbitrary value.
pub fn inc(&self) | [src] |
Increase the gauge by 1.
pub fn dec(&self) | [src] |
Decrease the gauge by 1.
pub fn add(&self, v: P::T) | [src] |
Add the given value to the gauge. (The value can be negative, resulting in a decrement of the gauge.)
pub fn sub(&self, v: P::T) | [src] |
Subtract the given value from the gauge. (The value can be negative, resulting in an increment of the gauge.)
pub fn get(&self) -> P::T | [src] |
Return the gauge value.
Trait Implementations
impl<P: Atomic> Collector for GenericGauge<P>[src]
impl<P: Atomic> Collector for GenericGauge<P>impl<P: Atomic> Metric for GenericGauge<P>[src]
impl<P: Atomic> Metric for GenericGauge<P>impl<P: Atomic> Clone for GenericGauge<P>[src]
impl<P: Atomic> Clone for GenericGauge<P>Auto Trait Implementations
impl<P> Send for GenericGauge<P>
impl<P> Send for GenericGauge<P>impl<P> Sync for GenericGauge<P>
impl<P> Sync for GenericGauge<P>Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<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> 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>, 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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
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] |