[−][src]Struct loom::sync::atomic::AtomicBool
Mock implementation of std::sync::atomic::AtomicBool
.
Methods
impl AtomicBool
[src]
pub fn new(v: bool) -> AtomicBool
[src]
Creates a new instance of AtomicBool
.
pub fn get_mut(&mut self) -> &mut bool
[src]
Returns a mutable reference to the underlying bool.
Panics
This function panics if the access is invalid under the Rust memory model.
pub unsafe fn unsync_load(&self) -> bool
[src]
Load the value without any synchronization.
pub fn load(&self, order: Ordering) -> bool
[src]
Loads a value from the atomic bool.
pub fn store(&self, val: bool, order: Ordering)
[src]
Stores a value into the atomic bool.
pub fn swap(&self, val: bool, order: Ordering) -> bool
[src]
Stores a value into the atomic bool, returning the previous value.
pub fn compare_and_swap(
&self,
current: bool,
new: bool,
order: Ordering
) -> bool
[src]
&self,
current: bool,
new: bool,
order: Ordering
) -> bool
Stores a value into the atomic bool if the current value is the same as the current
value.
pub fn compare_exchange(
&self,
current: bool,
new: bool,
success: Ordering,
failure: Ordering
) -> Result<bool, bool>
[src]
&self,
current: bool,
new: bool,
success: Ordering,
failure: Ordering
) -> Result<bool, bool>
Stores a value into the atomic if the current value is the same as the current
value.
pub fn compare_exchange_weak(
&self,
current: bool,
new: bool,
success: Ordering,
failure: Ordering
) -> Result<bool, bool>
[src]
&self,
current: bool,
new: bool,
success: Ordering,
failure: Ordering
) -> Result<bool, bool>
Stores a value into the atomic if the current value is the same as the current value.
pub fn fetch_and(&self, val: bool, order: Ordering) -> bool
[src]
Logical "and" with the current value.
pub fn fetch_nand(&self, val: bool, order: Ordering) -> bool
[src]
Logical "nand" with the current value.
pub fn fetch_or(&self, val: bool, order: Ordering) -> bool
[src]
Logical "or" with the current value.
pub fn fetch_xor(&self, val: bool, order: Ordering) -> bool
[src]
Logical "xor" with the current value.
Trait Implementations
Auto Trait Implementations
impl Send for AtomicBool
impl Sync for AtomicBool
impl Unpin for AtomicBool
impl UnwindSafe for AtomicBool
impl RefUnwindSafe for AtomicBool
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,