AtomicNumericId

Trait AtomicNumericId 

Source
pub unsafe trait AtomicNumericId: NumericId { }
Expand description

A NumericId whose in-memory representation may be accessed atomically.

§Safety

The ID must have the same size, byte representation, and set of valid bit patterns as both Self::Rep and Self::Atomic. (The atomic type may require stricter alignment; code creating an atomic view must check that separately.) It must therefore be sound to reinterpret a sufficiently aligned initialized slice of IDs as a slice of atomic integers, provided that atomic and non-atomic accesses do not overlap.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl AtomicNumericId for usize

Implementors§