Struct prometheus::core::GenericGauge[][src]

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

The underlying implementation for Gauge and IntGauge.

Methods

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

Create a GenericGauge with the name and help arguments.

Create a GenericGauge with the opts options.

Set the gauge to an arbitrary value.

Increase the gauge by 1.

Decrease the gauge by 1.

Add the given value to the gauge. (The value can be negative, resulting in a decrement of the gauge.)

Subtract the given value from the gauge. (The value can be negative, resulting in an increment of the gauge.)

Return the gauge value.

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<P: Atomic> Collector for GenericGauge<P>
[src]

Return descriptors for metrics.

Collect metrics.

impl<P: Atomic> Metric for GenericGauge<P>
[src]

Return the protocol Metric.

Auto Trait Implementations

impl<P> Send for GenericGauge<P>

impl<P> Sync for GenericGauge<P>