Skip to main content

AtomicU32

Type Alias AtomicU32 

1.34.0 · Source
pub type AtomicU32 = Atomic<u32>;
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, u32. However, the alignment of this type is always equal to its size, even on targets where u32 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 u32.

Aliased Type§

#[repr(C)]
pub struct AtomicU32 { /* private fields */ }

Trait Implementations§

Source§

impl<'de> Deserialize<'de> for AtomicU32

Available on no_target_has_atomic or target_has_atomic=32 only.
Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AtomicU32

Available on no_target_has_atomic or target_has_atomic=32 only.
Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more