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§

source

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.

source

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.

Implementations on Foreign Types§

source§

impl AtomicBitAnd<<AtomicU64 as Atomic>::Primitive> for AtomicU64

Available on target_has_atomic="64" only.
source§

fn fetch_and(&self, val: u64, order: Ordering) -> u64

source§

fn fetch_nand(&self, val: u64, order: Ordering) -> u64

source§

impl AtomicBitAnd<<AtomicI64 as Atomic>::Primitive> for AtomicI64

Available on target_has_atomic="64" only.
source§

fn fetch_and(&self, val: i64, order: Ordering) -> i64

source§

fn fetch_nand(&self, val: i64, order: Ordering) -> i64

source§

impl AtomicBitAnd<<AtomicI16 as Atomic>::Primitive> for AtomicI16

Available on target_has_atomic="16" only.
source§

fn fetch_and(&self, val: i16, order: Ordering) -> i16

source§

fn fetch_nand(&self, val: i16, order: Ordering) -> i16

source§

impl AtomicBitAnd<<AtomicU8 as Atomic>::Primitive> for AtomicU8

Available on target_has_atomic="8" only.
source§

fn fetch_and(&self, val: u8, order: Ordering) -> u8

source§

fn fetch_nand(&self, val: u8, order: Ordering) -> u8

source§

impl AtomicBitAnd<<AtomicU16 as Atomic>::Primitive> for AtomicU16

Available on target_has_atomic="16" only.
source§

fn fetch_and(&self, val: u16, order: Ordering) -> u16

source§

fn fetch_nand(&self, val: u16, order: Ordering) -> u16

source§

impl AtomicBitAnd<<AtomicU32 as Atomic>::Primitive> for AtomicU32

Available on target_has_atomic="32" only.
source§

fn fetch_and(&self, val: u32, order: Ordering) -> u32

source§

fn fetch_nand(&self, val: u32, order: Ordering) -> u32

source§

impl AtomicBitAnd<<AtomicI32 as Atomic>::Primitive> for AtomicI32

Available on target_has_atomic="32" only.
source§

fn fetch_and(&self, val: i32, order: Ordering) -> i32

source§

fn fetch_nand(&self, val: i32, order: Ordering) -> i32

source§

impl AtomicBitAnd<<AtomicI8 as Atomic>::Primitive> for AtomicI8

Available on target_has_atomic="8" only.
source§

fn fetch_and(&self, val: i8, order: Ordering) -> i8

source§

fn fetch_nand(&self, val: i8, order: Ordering) -> i8

source§

impl AtomicBitAnd<<AtomicUsize as Atomic>::Primitive> for AtomicUsize

Available on target_has_atomic="ptr" only.
source§

fn fetch_and(&self, val: usize, order: Ordering) -> usize

source§

fn fetch_nand(&self, val: usize, order: Ordering) -> usize

source§

impl AtomicBitAnd<<AtomicIsize as Atomic>::Primitive> for AtomicIsize

Available on target_has_atomic="ptr" only.
source§

fn fetch_and(&self, val: isize, order: Ordering) -> isize

source§

fn fetch_nand(&self, val: isize, order: Ordering) -> isize

Implementors§