Skip to main content

AtomicU64

Type Alias AtomicU64 

1.34.0 · Source
pub type AtomicU64 = Atomic<u64>;
Expand description

An integer type which can be safely shared between threads.

This type has the same size and bit validity as the underlying integer type, u64. However, the alignment of this type is always equal to its size, even on targets where u64 has a lesser alignment.

For more about the differences between atomic types and non-atomic types as well as information about the portability of this type, please see the module-level documentation.

Note: This type is only available on platforms that support atomic loads and stores of u64.

Aliased Type§

pub struct AtomicU64 { /* private fields */ }

Trait Implementations§

Source§

impl CounterFn for AtomicU64

Source§

fn increment(&self, value: u64)

Increments the counter by the given amount.
Source§

fn absolute(&self, value: u64)

Sets the counter to at least the given amount. Read more
Source§

impl GaugeFn for AtomicU64

Source§

fn increment(&self, value: f64)

Increments the gauge by the given amount.
Source§

fn decrement(&self, value: f64)

Decrements the gauge by the given amount.
Source§

fn set(&self, value: f64)

Sets the gauge to the given amount.