Constant atomic_ref::ATOMIC_U8_REF_INIT [] [src]

pub const ATOMIC_U8_REF_INIT: AtomicRef<'static, u8> = AtomicRef{data: ATOMIC_USIZE_INIT, _marker: PhantomData,}

You will probably never need to use this type. It exists mostly for internal use in the static_atomic_ref! macro.

Unlike AtomicUsize and its ilk, we cannot have an ATOMIC_REF_INIT const which is initialized to None, as constants cannot be generic over a type parameter. This is the same reason why AtomicPtr does not have an ATOMIC_PTR_INIT const.

Instead, we have a single const for &'static u8, and take advantage of the fact that all AtomicRef types have identical layout to implement the static_atomic_ref! macro.

Please use static_atomic_ref! instead of this constant if you need to implement a static atomic reference variable.