pub struct AtomicData { /* private fields */ }Expand description
Atomic<i64> storage — wraps a std::sync::atomic::AtomicI64 for
the atomic operations exposed by the Atomic.load / store /
fetch_add / fetch_sub / compare_exchange method surface.
i64-only at landing per the playbook’s typed-payload deferral
precedent (W15-priority-queue i64-priority-only). A typed-payload
Atomic<T> is a future Phase-2c amendment with measurement.
Memory ordering is SeqCst (sequential consistency) throughout —
the simplest semantically-correct ordering. Relaxed-ordering
optimizations are a measured follow-up.
Implementations§
Source§impl AtomicData
impl AtomicData
Sourcepub fn compare_exchange(&self, expected: i64, new_v: i64) -> i64
pub fn compare_exchange(&self, expected: i64, new_v: i64) -> i64
Atomic compare-exchange (SeqCst). Returns the prior value
regardless of success — callers infer success by comparing to
expected.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AtomicData
impl RefUnwindSafe for AtomicData
impl Send for AtomicData
impl Sync for AtomicData
impl Unpin for AtomicData
impl UnsafeUnpin for AtomicData
impl UnwindSafe for AtomicData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more