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§
Sourcefn try_set<T: TryInto<GaugeValue>>(
&self,
value: T,
) -> Result<GaugeValue, T::Error>
fn try_set<T: TryInto<GaugeValue>>( &self, value: T, ) -> Result<GaugeValue, T::Error>
Set a gauge from a lossless integer conversion.
Sourcefn try_set_max<T: TryInto<GaugeValue> + Copy>(
&self,
value: T,
) -> Result<GaugeValue, T::Error>
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".