1#![no_std]
2#![doc = include_str!("../README.md")]
3
4use crate::atomic_number::PrimitiveAtomicNumber;
5
6mod atomic_float;
7mod atomic_float_wrapper;
8mod atomic_integer;
9mod atomic_number;
10
11pub use atomic_float::AtomicFloat;
12pub use atomic_float::IntoAtomicFloat;
13pub use atomic_float_wrapper::UseUpdateToAdd;
14pub use atomic_float_wrapper::UseUpdateToMax;
15pub use atomic_float_wrapper::UseUpdateToMin;
16pub use atomic_float_wrapper::UseUpdateToSub;
17pub use atomic_integer::IntoAtomicInteger;
18pub use atomic_number::IntoAtomicNumber;
19
20#[expect(private_bounds)]
21pub struct AtomicNumber<P: PrimitiveAtomicNumber + Send> {
22 atomic: P::AN,
23}
24
25const _: [(); core::mem::size_of::<AtomicNumber<u32>>()] = [(); core::mem::size_of::<u32>()];
28const _: [(); core::mem::align_of::<AtomicNumber<u32>>()] = [(); core::mem::align_of::<u32>()];
29const _: [(); core::mem::size_of::<AtomicNumber<f32>>()] = [(); core::mem::size_of::<f32>()];
30const _: [(); core::mem::align_of::<AtomicNumber<f32>>()] = [(); core::mem::align_of::<f32>()];