Struct substrate_prometheus_endpoint::Gauge [−][src]
pub struct Gauge<P> where
    P: Atomic,  { /* fields omitted */ }Implementations
impl<P> GenericGauge<P> where
    P: Atomic, [src]
impl<P> GenericGauge<P> where
    P: Atomic, [src]pub fn new<S1, S2>(name: S1, help: S2) -> Result<GenericGauge<P>, Error> where
    S1: Into<String>,
    S2: Into<String>, [src]
S1: Into<String>,
S2: Into<String>,
Create a GenericGauge with the name and help arguments.
pub fn with_opts(opts: Opts) -> Result<GenericGauge<P>, Error>[src]
Create a GenericGauge with the opts options.
pub fn set(&self, v: <P as Atomic>::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 as Atomic>::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 as Atomic>::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 as Atomic>::T[src]
Return the gauge value.
Trait Implementations
impl<P> Clone for GenericGauge<P> where
    P: Atomic, [src]
impl<P> Clone for GenericGauge<P> where
    P: Atomic, [src]pub fn clone(&self) -> GenericGauge<P>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<P> Collector for GenericGauge<P> where
    P: Atomic, [src]
impl<P> Collector for GenericGauge<P> where
    P: Atomic, [src]impl<P> Debug for GenericGauge<P> where
    P: Debug + Atomic, [src]
impl<P> Debug for GenericGauge<P> where
    P: Debug + Atomic, [src]Auto Trait Implementations
impl<P> RefUnwindSafe for GenericGauge<P> where
    P: RefUnwindSafe, 
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, 
P: RefUnwindSafe,
Blanket Implementations
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> WithSubscriber for T[src]
impl<T> WithSubscriber for T[src]pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, [src]
S: Into<Dispatch>,