client_rust icon indicating copy to clipboard operation
client_rust copied to clipboard

Implement Atomic for usize

Open link2xt opened this issue 2 months ago • 2 comments

I want to store usize in a gauge metric without conveting it to u64, but Atomic trait is not implemented for usize: https://docs.rs/prometheus-client/0.22.2/prometheus_client/metrics/gauge/trait.Atomic.html

Because of this Gauge::<usize, AtomicUsize>::default(). Is there any reason for not supporting it? Would it require too high MSRV?

link2xt avatar Apr 16 '24 00:04 link2xt