pub struct Gauge<V: GaugeValue = i64>(/* private fields */);
Expand description
Gauge metric.
Gauges are integer or floating-point values that can go up or down. Logically, a reported gauge value can be treated as valid until the next value is reported.
Gauge values must implement the GaugeValue
trait.
Implementations§
Source§impl<V: GaugeValue> Gauge<V>
impl<V: GaugeValue> Gauge<V>
Trait Implementations§
Source§impl<V: GaugeValue> BuildMetric for Gauge<V>
impl<V: GaugeValue> BuildMetric for Gauge<V>
Source§impl<V: GaugeValue> Clone for Gauge<V>
impl<V: GaugeValue> Clone for Gauge<V>
Source§impl<V: GaugeValue> Debug for Gauge<V>
impl<V: GaugeValue> Debug for Gauge<V>
Source§impl<V: GaugeValue> Default for Gauge<V>
impl<V: GaugeValue> Default for Gauge<V>
Source§impl<V: GaugeValue> EncodeMetric for Gauge<V>
impl<V: GaugeValue> EncodeMetric for Gauge<V>
Source§fn encode(&self, encoder: MetricEncoder<'_>) -> Result
fn encode(&self, encoder: MetricEncoder<'_>) -> Result
Encode the given instance in the OpenMetrics text encoding.
Source§fn metric_type(&self) -> MetricType
fn metric_type(&self) -> MetricType
The OpenMetrics metric type of the instance.
Source§impl<V: GaugeValue> TypedMetric for Gauge<V>
impl<V: GaugeValue> TypedMetric for Gauge<V>
Source§const TYPE: MetricType = MetricType::Gauge
const TYPE: MetricType = MetricType::Gauge
The OpenMetrics metric type.
Auto Trait Implementations§
impl<V> Freeze for Gauge<V>
impl<V> RefUnwindSafe for Gauge<V>
impl<V> Send for Gauge<V>
impl<V> Sync for Gauge<V>
impl<V> Unpin for Gauge<V>where
V: Unpin,
impl<V> UnwindSafe for Gauge<V>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more