Trait metrics::GaugeFn

source ·
pub trait GaugeFn {
    // Required methods
    fn increment(&self, value: f64);
    fn decrement(&self, value: f64);
    fn set(&self, value: f64);
}
Expand description

A gauge handler.

Required Methods§

source

fn increment(&self, value: f64)

Increments the gauge by the given amount.

Returns the previous value.

source

fn decrement(&self, value: f64)

Decrements the gauge by the given amount.

Returns the previous value.

source

fn set(&self, value: f64)

Sets the gauge to the given amount.

Returns the previous value.

Implementations on Foreign Types§

source§

impl GaugeFn for AtomicU64

source§

fn increment(&self, value: f64)

source§

fn decrement(&self, value: f64)

source§

fn set(&self, value: f64)

source§

impl<T> GaugeFn for Arc<T>where T: GaugeFn,

source§

fn increment(&self, value: f64)

source§

fn decrement(&self, value: f64)

source§

fn set(&self, value: f64)

Implementors§