[][src]Struct loom::sync::atomic::AtomicBool

pub struct 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]

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]

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]

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

impl Default for AtomicBool[src]

impl Debug for AtomicBool[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]