pub trait MetricCell: Default + Sealed {
type Value: Copy;
// Required methods
fn get(&self) -> Self::Value;
fn set(&self, value: Self::Value);
fn add(&self, value: Self::Value);
}Expand description
An atomic cell holding a single metric value: AtomicCount or AtomicDuration.
Metrics are written only by the thread running the dataflow and may be read concurrently from
other threads, so all operations use Ordering::Relaxed.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".