Skip to main content

GaugeExt

Trait GaugeExt 

Source
pub trait GaugeExt {
    // Required methods
    fn try_set<T: TryInto<GaugeValue>>(
        &self,
        value: T,
    ) -> Result<GaugeValue, T::Error>;
    fn try_set_max<T: TryInto<GaugeValue> + Copy>(
        &self,
        value: T,
    ) -> Result<GaugeValue, T::Error>;
}
Expand description

Convenience methods for Prometheus gauges.

Required Methods§

Source

fn try_set<T: TryInto<GaugeValue>>( &self, value: T, ) -> Result<GaugeValue, T::Error>

Set a gauge from a lossless integer conversion.

Source

fn try_set_max<T: TryInto<GaugeValue> + Copy>( &self, value: T, ) -> Result<GaugeValue, T::Error>

Atomically raise a gauge to at least the provided value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§