Skip to main content

Gauge

Trait Gauge 

Source
pub trait Gauge:
    Send
    + Sync
    + Debug
    + DynClone {
    // Required methods
    fn set(&self, amount: usize);
    fn update(&self, delta: i64);
}
Expand description

A gauge that stores the latest value.

Required Methods§

Source

fn set(&self, amount: usize)

Set the gauge value

Source

fn update(&self, delta: i64)

Update the gauge value

Trait Implementations§

Source§

impl MetricsFamily<Box<dyn Gauge>> for NoMetrics

Source§

fn create(&self, _: Vec<String>) -> Box<dyn Gauge>

Instantiate a metric in this family with a specific label vector. Read more
Source§

fn destroy(&self, _: &[&str])

Remove a metric in this family identified by its label values. Read more

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§