pub struct OSAtomicI32 { /* private fields */ }Expand description
Safe wrapper around a 32-bit legacy OSAtomic value.
Implementations§
Source§impl OSAtomicI32
impl OSAtomicI32
pub fn new(value: i32) -> Self
pub fn load(&self) -> i32
pub fn store(&self, value: i32)
pub fn add(&self, amount: i32) -> i32
pub fn add_barrier(&self, amount: i32) -> i32
pub fn increment(&self) -> i32
pub fn increment_barrier(&self) -> i32
pub fn decrement(&self) -> i32
pub fn decrement_barrier(&self) -> i32
pub fn or(&self, mask: u32) -> i32
pub fn or_barrier(&self, mask: u32) -> i32
pub fn or_orig(&self, mask: u32) -> i32
pub fn or_orig_barrier(&self, mask: u32) -> i32
pub fn and(&self, mask: u32) -> i32
pub fn and_barrier(&self, mask: u32) -> i32
pub fn and_orig(&self, mask: u32) -> i32
pub fn and_orig_barrier(&self, mask: u32) -> i32
pub fn xor(&self, mask: u32) -> i32
pub fn xor_barrier(&self, mask: u32) -> i32
pub fn xor_orig(&self, mask: u32) -> i32
pub fn xor_orig_barrier(&self, mask: u32) -> i32
pub fn compare_and_swap(&self, old_value: i32, new_value: i32) -> bool
pub fn compare_and_swap_barrier(&self, old_value: i32, new_value: i32) -> bool
Trait Implementations§
Source§impl Drop for OSAtomicI32
impl Drop for OSAtomicI32
Auto Trait Implementations§
impl Freeze for OSAtomicI32
impl RefUnwindSafe for OSAtomicI32
impl !Send for OSAtomicI32
impl !Sync for OSAtomicI32
impl Unpin for OSAtomicI32
impl UnsafeUnpin for OSAtomicI32
impl UnwindSafe for OSAtomicI32
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more