pub trait AtomicBitOr<T = <Self as Atomic>::Primitive>: Atomic {
// Required method
fn fetch_or(&self, val: T, order: Ordering) -> Self::Primitive;
}
Expand description
A trait representing atomic types that support bitwise OR operations.
Required Methods§
Sourcefn fetch_or(&self, val: T, order: Ordering) -> Self::Primitive
fn fetch_or(&self, val: T, order: Ordering) -> Self::Primitive
Bitwise “or” with the current value.
Performs a bitwise “or” operation on the current value and the argument val
, and
sets the new value to the result.
Returns the previous value.
fetch_or
takes an Ordering
argument which describes the memory ordering
of this operation. All ordering modes are possible. Note that using
Acquire
makes the store part of this operation Relaxed
, and
using Release
makes the load part Relaxed
.
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 AtomicBitOr for AtomicI8
Available on target_has_atomic="8"
only.
impl AtomicBitOr for AtomicI8
Available on
target_has_atomic="8"
only.Source§impl AtomicBitOr for AtomicI16
Available on target_has_atomic="16"
only.
impl AtomicBitOr for AtomicI16
Available on
target_has_atomic="16"
only.Source§impl AtomicBitOr for AtomicI32
Available on target_has_atomic="32"
only.
impl AtomicBitOr for AtomicI32
Available on
target_has_atomic="32"
only.Source§impl AtomicBitOr for AtomicI64
Available on target_has_atomic="64"
only.
impl AtomicBitOr for AtomicI64
Available on
target_has_atomic="64"
only.Source§impl AtomicBitOr for AtomicIsize
Available on target_has_atomic="ptr"
only.
impl AtomicBitOr for AtomicIsize
Available on
target_has_atomic="ptr"
only.Source§impl AtomicBitOr for AtomicU8
Available on target_has_atomic="8"
only.
impl AtomicBitOr for AtomicU8
Available on
target_has_atomic="8"
only.Source§impl AtomicBitOr for AtomicU16
Available on target_has_atomic="16"
only.
impl AtomicBitOr for AtomicU16
Available on
target_has_atomic="16"
only.Source§impl AtomicBitOr for AtomicU32
Available on target_has_atomic="32"
only.
impl AtomicBitOr for AtomicU32
Available on
target_has_atomic="32"
only.Source§impl AtomicBitOr for AtomicU64
Available on target_has_atomic="64"
only.
impl AtomicBitOr for AtomicU64
Available on
target_has_atomic="64"
only.Source§impl AtomicBitOr for AtomicUsize
Available on target_has_atomic="ptr"
only.
impl AtomicBitOr for AtomicUsize
Available on
target_has_atomic="ptr"
only.