Trait vise::traits::GaugeValue

source ·
pub trait GaugeValue: 'static + Copy + Debug {
    type Atomic: Atomic<Self> + Default + Debug;

    // Required method
    fn encode(self) -> EncodedGaugeValue;
}
Expand description

Value of a Gauge.

This trait is implemented for signed and unsigned integers (i64, u64, isize, usize), f64 and Duration. To use smaller ints and floats as Gauge values, they can be converted to their larger-sized variants (e.g., i16 to i64, u32 to u64, and f32 to f64).

Required Associated Types§

source

type Atomic: Atomic<Self> + Default + Debug

Atomic store for the value.

Required Methods§

source

fn encode(self) -> EncodedGaugeValue

Encodes this value for exporting.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl GaugeValue for f64

source§

impl GaugeValue for i64

source§

impl GaugeValue for isize

source§

impl GaugeValue for u64

source§

impl GaugeValue for usize

source§

impl GaugeValue for Duration

Implementors§