Trait utils_atomics::traits::AtomicBitAnd
source · pub trait AtomicBitAnd<T = <Self as Atomic>::Primitive>: Atomic {
// Required methods
fn fetch_and(&self, val: T, order: Ordering) -> Self::Primitive;
fn fetch_nand(&self, val: T, order: Ordering) -> Self::Primitive;
}
Expand description
A trait representing atomic types that support subtraction operations.
Required Methods§
sourcefn fetch_and(&self, val: T, order: Ordering) -> Self::Primitive
fn fetch_and(&self, val: T, order: Ordering) -> Self::Primitive
Bitwise “and” with the current value.
Performs a bitwise “and” operation on the current value and the argument val
, and
sets the new value to the result.
Returns the previous value.
fetch_and
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
.
sourcefn fetch_nand(&self, val: T, order: Ordering) -> Self::Primitive
fn fetch_nand(&self, val: T, order: Ordering) -> Self::Primitive
Bitwise “nand” with the current value.
Performs a bitwise “nand” operation on the current value and the argument val
, and
sets the new value to the result.
Returns the previous value.
fetch_nand
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
.
Object Safety§
Implementations on Foreign Types§
source§impl AtomicBitAnd for AtomicI8
Available on target_has_atomic="8"
only.
impl AtomicBitAnd for AtomicI8
target_has_atomic="8"
only.source§impl AtomicBitAnd for AtomicI16
Available on target_has_atomic="16"
only.
impl AtomicBitAnd for AtomicI16
target_has_atomic="16"
only.source§impl AtomicBitAnd for AtomicI32
Available on target_has_atomic="32"
only.
impl AtomicBitAnd for AtomicI32
target_has_atomic="32"
only.source§impl AtomicBitAnd for AtomicI64
Available on target_has_atomic="64"
only.
impl AtomicBitAnd for AtomicI64
target_has_atomic="64"
only.source§impl AtomicBitAnd for AtomicIsize
Available on target_has_atomic="ptr"
only.
impl AtomicBitAnd for AtomicIsize
target_has_atomic="ptr"
only.source§impl AtomicBitAnd for AtomicU8
Available on target_has_atomic="8"
only.
impl AtomicBitAnd for AtomicU8
target_has_atomic="8"
only.source§impl AtomicBitAnd for AtomicU16
Available on target_has_atomic="16"
only.
impl AtomicBitAnd for AtomicU16
target_has_atomic="16"
only.source§impl AtomicBitAnd for AtomicU32
Available on target_has_atomic="32"
only.
impl AtomicBitAnd for AtomicU32
target_has_atomic="32"
only.source§impl AtomicBitAnd for AtomicU64
Available on target_has_atomic="64"
only.
impl AtomicBitAnd for AtomicU64
target_has_atomic="64"
only.source§impl AtomicBitAnd for AtomicUsize
Available on target_has_atomic="ptr"
only.
impl AtomicBitAnd for AtomicUsize
target_has_atomic="ptr"
only.