Struct prometheus::core::GenericGauge
source · [−]pub struct GenericGauge<P: Atomic> { /* private fields */ }
Implementations
sourceimpl<P: Atomic> GenericGauge<P>
impl<P: Atomic> GenericGauge<P>
sourcepub fn new<S1: Into<String>, S2: Into<String>>(
name: S1,
help: S2
) -> Result<Self>
pub fn new<S1: Into<String>, S2: Into<String>>(
name: S1,
help: S2
) -> Result<Self>
Create a GenericGauge
with the name
and help
arguments.
sourcepub fn with_opts(opts: Opts) -> Result<Self>
pub fn with_opts(opts: Opts) -> Result<Self>
Create a GenericGauge
with the opts
options.
sourcepub fn add(&self, v: P::T)
pub fn add(&self, v: P::T)
Add the given value to the gauge. (The value can be negative, resulting in a decrement of the gauge.)
Trait Implementations
sourceimpl<P: Atomic> Clone for GenericGauge<P>
impl<P: Atomic> Clone for GenericGauge<P>
sourceimpl<P: Atomic> Collector for GenericGauge<P>
impl<P: Atomic> Collector for GenericGauge<P>
sourceimpl<P: Debug + Atomic> Debug for GenericGauge<P>
impl<P: Debug + Atomic> Debug for GenericGauge<P>
Auto Trait Implementations
impl<P> RefUnwindSafe for GenericGauge<P> where
P: RefUnwindSafe,
impl<P> Send for GenericGauge<P>
impl<P> Sync for GenericGauge<P>
impl<P> Unpin for GenericGauge<P>
impl<P> UnwindSafe for GenericGauge<P> where
P: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more