pub struct RelaxedAtomic<T> { /* private fields */ }Expand description
Wrapper around atomic types that assumes Ordering::Relaxed for all
operations to simplify pure relaxed use cases.
Implementations§
Source§impl RelaxedAtomic<AtomicI8>
impl RelaxedAtomic<AtomicI8>
Sourcepub fn fetch_add(&self, value: i8) -> i8
pub fn fetch_add(&self, value: i8) -> i8
Adds to the current value, returning the previous value, with relaxed ordering.
Sourcepub fn fetch_sub(&self, value: i8) -> i8
pub fn fetch_sub(&self, value: i8) -> i8
Subtracts from the current value, returning the previous value, with relaxed ordering.
Source§impl RelaxedAtomic<AtomicI16>
impl RelaxedAtomic<AtomicI16>
Sourcepub fn fetch_add(&self, value: i16) -> i16
pub fn fetch_add(&self, value: i16) -> i16
Adds to the current value, returning the previous value, with relaxed ordering.
Sourcepub fn fetch_sub(&self, value: i16) -> i16
pub fn fetch_sub(&self, value: i16) -> i16
Subtracts from the current value, returning the previous value, with relaxed ordering.
Source§impl RelaxedAtomic<AtomicI32>
impl RelaxedAtomic<AtomicI32>
Sourcepub fn fetch_add(&self, value: i32) -> i32
pub fn fetch_add(&self, value: i32) -> i32
Adds to the current value, returning the previous value, with relaxed ordering.
Sourcepub fn fetch_sub(&self, value: i32) -> i32
pub fn fetch_sub(&self, value: i32) -> i32
Subtracts from the current value, returning the previous value, with relaxed ordering.
Source§impl RelaxedAtomic<AtomicI64>
impl RelaxedAtomic<AtomicI64>
Sourcepub fn fetch_add(&self, value: i64) -> i64
pub fn fetch_add(&self, value: i64) -> i64
Adds to the current value, returning the previous value, with relaxed ordering.
Sourcepub fn fetch_sub(&self, value: i64) -> i64
pub fn fetch_sub(&self, value: i64) -> i64
Subtracts from the current value, returning the previous value, with relaxed ordering.
Source§impl RelaxedAtomic<AtomicIsize>
impl RelaxedAtomic<AtomicIsize>
Sourcepub fn fetch_add(&self, value: isize) -> isize
pub fn fetch_add(&self, value: isize) -> isize
Adds to the current value, returning the previous value, with relaxed ordering.
Sourcepub fn fetch_sub(&self, value: isize) -> isize
pub fn fetch_sub(&self, value: isize) -> isize
Subtracts from the current value, returning the previous value, with relaxed ordering.
Source§impl RelaxedAtomic<AtomicU8>
impl RelaxedAtomic<AtomicU8>
Sourcepub fn fetch_add(&self, value: u8) -> u8
pub fn fetch_add(&self, value: u8) -> u8
Adds to the current value, returning the previous value, with relaxed ordering.
Sourcepub fn fetch_sub(&self, value: u8) -> u8
pub fn fetch_sub(&self, value: u8) -> u8
Subtracts from the current value, returning the previous value, with relaxed ordering.
Source§impl RelaxedAtomic<AtomicU16>
impl RelaxedAtomic<AtomicU16>
Sourcepub fn fetch_add(&self, value: u16) -> u16
pub fn fetch_add(&self, value: u16) -> u16
Adds to the current value, returning the previous value, with relaxed ordering.
Sourcepub fn fetch_sub(&self, value: u16) -> u16
pub fn fetch_sub(&self, value: u16) -> u16
Subtracts from the current value, returning the previous value, with relaxed ordering.
Source§impl RelaxedAtomic<AtomicU32>
impl RelaxedAtomic<AtomicU32>
Sourcepub fn fetch_add(&self, value: u32) -> u32
pub fn fetch_add(&self, value: u32) -> u32
Adds to the current value, returning the previous value, with relaxed ordering.
Sourcepub fn fetch_sub(&self, value: u32) -> u32
pub fn fetch_sub(&self, value: u32) -> u32
Subtracts from the current value, returning the previous value, with relaxed ordering.
Source§impl RelaxedAtomic<AtomicU64>
impl RelaxedAtomic<AtomicU64>
Sourcepub fn fetch_add(&self, value: u64) -> u64
pub fn fetch_add(&self, value: u64) -> u64
Adds to the current value, returning the previous value, with relaxed ordering.
Sourcepub fn fetch_sub(&self, value: u64) -> u64
pub fn fetch_sub(&self, value: u64) -> u64
Subtracts from the current value, returning the previous value, with relaxed ordering.
Source§impl RelaxedAtomic<AtomicUsize>
impl RelaxedAtomic<AtomicUsize>
Sourcepub fn fetch_add(&self, value: usize) -> usize
pub fn fetch_add(&self, value: usize) -> usize
Adds to the current value, returning the previous value, with relaxed ordering.
Sourcepub fn fetch_sub(&self, value: usize) -> usize
pub fn fetch_sub(&self, value: usize) -> usize
Subtracts from the current value, returning the previous value, with relaxed ordering.