Trait prometheus::core::Atomic
source · pub trait Atomic: Send + Sync {
type T: Number;
// Required methods
fn new(val: Self::T) -> Self;
fn set(&self, val: Self::T);
fn get(&self) -> Self::T;
fn inc_by(&self, delta: Self::T);
fn dec_by(&self, delta: Self::T);
}
Expand description
An interface for atomics. Used to generically model float metrics and integer metrics, i.e.
Counter
and IntCounter
.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.