radium

Trait Radium

Source
pub trait Radium {
    type Item;

Show 17 methods // Required methods fn new(value: Self::Item) -> Self; fn fence(order: Ordering); fn get_mut(&mut self) -> &mut Self::Item; fn into_inner(self) -> Self::Item; fn load(&self, order: Ordering) -> Self::Item; fn store(&self, value: Self::Item, order: Ordering); fn swap(&self, value: Self::Item, order: Ordering) -> Self::Item; fn compare_and_swap( &self, current: Self::Item, new: Self::Item, order: Ordering, ) -> Self::Item; fn compare_exchange( &self, current: Self::Item, new: Self::Item, success: Ordering, failure: Ordering, ) -> Result<Self::Item, Self::Item>; fn compare_exchange_weak( &self, current: Self::Item, new: Self::Item, success: Ordering, failure: Ordering, ) -> Result<Self::Item, Self::Item>; fn fetch_and(&self, value: Self::Item, order: Ordering) -> Self::Item where Self::Item: BitOps; fn fetch_nand(&self, value: Self::Item, order: Ordering) -> Self::Item where Self::Item: BitOps; fn fetch_or(&self, value: Self::Item, order: Ordering) -> Self::Item where Self::Item: BitOps; fn fetch_xor(&self, value: Self::Item, order: Ordering) -> Self::Item where Self::Item: BitOps; fn fetch_add(&self, value: Self::Item, order: Ordering) -> Self::Item where Self::Item: NumericOps; fn fetch_sub(&self, value: Self::Item, order: Ordering) -> Self::Item where Self::Item: NumericOps; fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<Self::Item, Self::Item> where F: FnMut(Self::Item) -> Option<Self::Item>;
}
Expand description

A maybe-atomic shared mutable fundamental type T.

This trait is implemented by both the atomic wrapper type for T, and by Cell<T>, providing a consistent interface for interacting with the two types.

This trait provides methods predicated on marker traits for the underlying fundamental. Only types which can be viewed as sequences of bits may use the functions for bit-wise arithmetic, and only types which can be used as integers may use the functions for numeric arithmetic. Use of these methods on insufficient underlying types (for example, Radium::fetch_and on an atomic or cell-wrapped pointer) will cause a compiler error.

Required Associated Types§

Required Methods§

Source

fn new(value: Self::Item) -> Self

Creates a new value of this type.

Source

fn fence(order: Ordering)

If the underlying value is atomic, calls fence with the given Ordering. Otherwise, does nothing.

Source

fn get_mut(&mut self) -> &mut Self::Item

Returns a mutable reference to the underlying value.

This is safe because the mutable reference to self guarantees that no other references exist to this value.

Source

fn into_inner(self) -> Self::Item

Consumes the wrapper and returns the contained value.

This is safe as passing by value ensures no other references exist.

Source

fn load(&self, order: Ordering) -> Self::Item

Load a value from this object.

Ordering values are ignored by non-atomic types.

See also: AtomicUsize::load.

Source

fn store(&self, value: Self::Item, order: Ordering)

Store a value in this object.

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::store.

Source

fn swap(&self, value: Self::Item, order: Ordering) -> Self::Item

Swap with the value stored in this object.

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::swap.

Source

fn compare_and_swap( &self, current: Self::Item, new: Self::Item, order: Ordering, ) -> Self::Item

👎Deprecated: Use compare_exchange or compare_exchange_weak instead

Stores a value into this object if the currently-stored value is the same as the current value.

The return value is always the previously-stored value. If it is equal to current, then the value was updated with new.

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::compare_and_swap.

Source

fn compare_exchange( &self, current: Self::Item, new: Self::Item, success: Ordering, failure: Ordering, ) -> Result<Self::Item, Self::Item>

Stores a value into this object if the currently-stored value is the same as the current value.

The return value is a Result indicating whether the new value was written, and containing the previously-stored value. On success, this value is guaranteed to be equal to current.

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::compare_exchange.

Source

fn compare_exchange_weak( &self, current: Self::Item, new: Self::Item, success: Ordering, failure: Ordering, ) -> Result<Self::Item, Self::Item>

Stores a value into this object if the currently-stored value is the same as the current value.

Unlike compare_exchange, this function is allowed to spuriously fail even when the comparison succeeds, which can result in more efficient code on some platforms. The return value is a Result indicating whether the new value was written, and containing the previously-stored value.

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::compare_exchange_weak.

Source

fn fetch_and(&self, value: Self::Item, order: Ordering) -> Self::Item
where Self::Item: BitOps,

Performs a bitwise “and” on the currently-stored value and the argument value, and stores the result in self.

Returns the previously-stored value.

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::fetch_and.

Source

fn fetch_nand(&self, value: Self::Item, order: Ordering) -> Self::Item
where Self::Item: BitOps,

Performs a bitwise “nand” on the currently-stored value and the argument value, and stores the result in self.

Returns the previously-stored value.

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::fetch_nand.

Source

fn fetch_or(&self, value: Self::Item, order: Ordering) -> Self::Item
where Self::Item: BitOps,

Performs a bitwise “or” on the currently-stored value and the argument value, and stores the result in self.

Returns the previously-stored value.

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::fetch_or.

Source

fn fetch_xor(&self, value: Self::Item, order: Ordering) -> Self::Item
where Self::Item: BitOps,

Performs a bitwise “xor” on the currently-stored value and the argument value, and stores the result in self.

Returns the previously-stored value.

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::fetch_xor.

Source

fn fetch_add(&self, value: Self::Item, order: Ordering) -> Self::Item
where Self::Item: NumericOps,

Adds value to the currently-stored value, wrapping on overflow, and stores the result in self.

Returns the previously-stored value.

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::fetch_add.

Source

fn fetch_sub(&self, value: Self::Item, order: Ordering) -> Self::Item
where Self::Item: NumericOps,

Subtracts value from the currently-stored value, wrapping on underflow, and stores the result in self.

Returns the previously-stored value.

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::fetch_sub.

Source

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<Self::Item, Self::Item>
where F: FnMut(Self::Item) -> Option<Self::Item>,

Fetches the value, and applies a function to it that returns an optional new value.

Note: This may call the function multiple times if the value has been changed from other threads in the meantime, as long as the function returns Some(_), but the function will have been applied only once to the stored value.

Returns a Result of Ok(previous_value) if the function returned Some(_), else Err(previous_value).

Ordering arguments are ignored by non-atomic types.

See also: AtomicUsize::fetch_update.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Radium for Cell<bool>

Source§

type Item = bool

Source§

fn new(value: bool) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut bool

Source§

fn into_inner(self) -> bool

Source§

fn load(&self, _: Ordering) -> bool

Source§

fn store(&self, value: bool, _: Ordering)

Source§

fn swap(&self, value: bool, _: Ordering) -> bool

Source§

fn compare_and_swap(&self, current: bool, new: bool, _: Ordering) -> bool

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: bool, new: bool, _: Ordering, _: Ordering, ) -> Result<bool, bool>

Source§

fn compare_exchange_weak( &self, current: bool, new: bool, success: Ordering, failure: Ordering, ) -> Result<bool, bool>

Source§

fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<bool, bool>
where F: FnMut(bool) -> Option<bool>,

Source§

fn fetch_and(&self, value: bool, _: Ordering) -> bool

Source§

fn fetch_nand(&self, value: bool, _: Ordering) -> bool

Source§

fn fetch_or(&self, value: bool, _: Ordering) -> bool

Source§

fn fetch_xor(&self, value: bool, _: Ordering) -> bool

Source§

impl Radium for Cell<i8>

Source§

type Item = i8

Source§

fn new(value: i8) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut i8

Source§

fn into_inner(self) -> i8

Source§

fn load(&self, _: Ordering) -> i8

Source§

fn store(&self, value: i8, _: Ordering)

Source§

fn swap(&self, value: i8, _: Ordering) -> i8

Source§

fn compare_and_swap(&self, current: i8, new: i8, _: Ordering) -> i8

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: i8, new: i8, _: Ordering, _: Ordering, ) -> Result<i8, i8>

Source§

fn compare_exchange_weak( &self, current: i8, new: i8, success: Ordering, failure: Ordering, ) -> Result<i8, i8>

Source§

fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i8, i8>
where F: FnMut(i8) -> Option<i8>,

Source§

fn fetch_and(&self, value: i8, _: Ordering) -> i8

Source§

fn fetch_nand(&self, value: i8, _: Ordering) -> i8

Source§

fn fetch_or(&self, value: i8, _: Ordering) -> i8

Source§

fn fetch_xor(&self, value: i8, _: Ordering) -> i8

Source§

fn fetch_add(&self, value: i8, _: Ordering) -> i8

Source§

fn fetch_sub(&self, value: i8, _: Ordering) -> i8

Source§

impl Radium for Cell<i16>

Source§

type Item = i16

Source§

fn new(value: i16) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut i16

Source§

fn into_inner(self) -> i16

Source§

fn load(&self, _: Ordering) -> i16

Source§

fn store(&self, value: i16, _: Ordering)

Source§

fn swap(&self, value: i16, _: Ordering) -> i16

Source§

fn compare_and_swap(&self, current: i16, new: i16, _: Ordering) -> i16

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: i16, new: i16, _: Ordering, _: Ordering, ) -> Result<i16, i16>

Source§

fn compare_exchange_weak( &self, current: i16, new: i16, success: Ordering, failure: Ordering, ) -> Result<i16, i16>

Source§

fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i16, i16>
where F: FnMut(i16) -> Option<i16>,

Source§

fn fetch_and(&self, value: i16, _: Ordering) -> i16

Source§

fn fetch_nand(&self, value: i16, _: Ordering) -> i16

Source§

fn fetch_or(&self, value: i16, _: Ordering) -> i16

Source§

fn fetch_xor(&self, value: i16, _: Ordering) -> i16

Source§

fn fetch_add(&self, value: i16, _: Ordering) -> i16

Source§

fn fetch_sub(&self, value: i16, _: Ordering) -> i16

Source§

impl Radium for Cell<i32>

Source§

type Item = i32

Source§

fn new(value: i32) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut i32

Source§

fn into_inner(self) -> i32

Source§

fn load(&self, _: Ordering) -> i32

Source§

fn store(&self, value: i32, _: Ordering)

Source§

fn swap(&self, value: i32, _: Ordering) -> i32

Source§

fn compare_and_swap(&self, current: i32, new: i32, _: Ordering) -> i32

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: i32, new: i32, _: Ordering, _: Ordering, ) -> Result<i32, i32>

Source§

fn compare_exchange_weak( &self, current: i32, new: i32, success: Ordering, failure: Ordering, ) -> Result<i32, i32>

Source§

fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i32, i32>
where F: FnMut(i32) -> Option<i32>,

Source§

fn fetch_and(&self, value: i32, _: Ordering) -> i32

Source§

fn fetch_nand(&self, value: i32, _: Ordering) -> i32

Source§

fn fetch_or(&self, value: i32, _: Ordering) -> i32

Source§

fn fetch_xor(&self, value: i32, _: Ordering) -> i32

Source§

fn fetch_add(&self, value: i32, _: Ordering) -> i32

Source§

fn fetch_sub(&self, value: i32, _: Ordering) -> i32

Source§

impl Radium for Cell<i64>

Source§

type Item = i64

Source§

fn new(value: i64) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut i64

Source§

fn into_inner(self) -> i64

Source§

fn load(&self, _: Ordering) -> i64

Source§

fn store(&self, value: i64, _: Ordering)

Source§

fn swap(&self, value: i64, _: Ordering) -> i64

Source§

fn compare_and_swap(&self, current: i64, new: i64, _: Ordering) -> i64

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: i64, new: i64, _: Ordering, _: Ordering, ) -> Result<i64, i64>

Source§

fn compare_exchange_weak( &self, current: i64, new: i64, success: Ordering, failure: Ordering, ) -> Result<i64, i64>

Source§

fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i64, i64>
where F: FnMut(i64) -> Option<i64>,

Source§

fn fetch_and(&self, value: i64, _: Ordering) -> i64

Source§

fn fetch_nand(&self, value: i64, _: Ordering) -> i64

Source§

fn fetch_or(&self, value: i64, _: Ordering) -> i64

Source§

fn fetch_xor(&self, value: i64, _: Ordering) -> i64

Source§

fn fetch_add(&self, value: i64, _: Ordering) -> i64

Source§

fn fetch_sub(&self, value: i64, _: Ordering) -> i64

Source§

impl Radium for Cell<isize>

Source§

type Item = isize

Source§

fn new(value: isize) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut isize

Source§

fn into_inner(self) -> isize

Source§

fn load(&self, _: Ordering) -> isize

Source§

fn store(&self, value: isize, _: Ordering)

Source§

fn swap(&self, value: isize, _: Ordering) -> isize

Source§

fn compare_and_swap(&self, current: isize, new: isize, _: Ordering) -> isize

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: isize, new: isize, _: Ordering, _: Ordering, ) -> Result<isize, isize>

Source§

fn compare_exchange_weak( &self, current: isize, new: isize, success: Ordering, failure: Ordering, ) -> Result<isize, isize>

Source§

fn fetch_update<F>( &self, _: Ordering, _: Ordering, f: F, ) -> Result<isize, isize>
where F: FnMut(isize) -> Option<isize>,

Source§

fn fetch_and(&self, value: isize, _: Ordering) -> isize

Source§

fn fetch_nand(&self, value: isize, _: Ordering) -> isize

Source§

fn fetch_or(&self, value: isize, _: Ordering) -> isize

Source§

fn fetch_xor(&self, value: isize, _: Ordering) -> isize

Source§

fn fetch_add(&self, value: isize, _: Ordering) -> isize

Source§

fn fetch_sub(&self, value: isize, _: Ordering) -> isize

Source§

impl Radium for Cell<u8>

Source§

type Item = u8

Source§

fn new(value: u8) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut u8

Source§

fn into_inner(self) -> u8

Source§

fn load(&self, _: Ordering) -> u8

Source§

fn store(&self, value: u8, _: Ordering)

Source§

fn swap(&self, value: u8, _: Ordering) -> u8

Source§

fn compare_and_swap(&self, current: u8, new: u8, _: Ordering) -> u8

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: u8, new: u8, _: Ordering, _: Ordering, ) -> Result<u8, u8>

Source§

fn compare_exchange_weak( &self, current: u8, new: u8, success: Ordering, failure: Ordering, ) -> Result<u8, u8>

Source§

fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u8, u8>
where F: FnMut(u8) -> Option<u8>,

Source§

fn fetch_and(&self, value: u8, _: Ordering) -> u8

Source§

fn fetch_nand(&self, value: u8, _: Ordering) -> u8

Source§

fn fetch_or(&self, value: u8, _: Ordering) -> u8

Source§

fn fetch_xor(&self, value: u8, _: Ordering) -> u8

Source§

fn fetch_add(&self, value: u8, _: Ordering) -> u8

Source§

fn fetch_sub(&self, value: u8, _: Ordering) -> u8

Source§

impl Radium for Cell<u16>

Source§

type Item = u16

Source§

fn new(value: u16) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut u16

Source§

fn into_inner(self) -> u16

Source§

fn load(&self, _: Ordering) -> u16

Source§

fn store(&self, value: u16, _: Ordering)

Source§

fn swap(&self, value: u16, _: Ordering) -> u16

Source§

fn compare_and_swap(&self, current: u16, new: u16, _: Ordering) -> u16

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: u16, new: u16, _: Ordering, _: Ordering, ) -> Result<u16, u16>

Source§

fn compare_exchange_weak( &self, current: u16, new: u16, success: Ordering, failure: Ordering, ) -> Result<u16, u16>

Source§

fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u16, u16>
where F: FnMut(u16) -> Option<u16>,

Source§

fn fetch_and(&self, value: u16, _: Ordering) -> u16

Source§

fn fetch_nand(&self, value: u16, _: Ordering) -> u16

Source§

fn fetch_or(&self, value: u16, _: Ordering) -> u16

Source§

fn fetch_xor(&self, value: u16, _: Ordering) -> u16

Source§

fn fetch_add(&self, value: u16, _: Ordering) -> u16

Source§

fn fetch_sub(&self, value: u16, _: Ordering) -> u16

Source§

impl Radium for Cell<u32>

Source§

type Item = u32

Source§

fn new(value: u32) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut u32

Source§

fn into_inner(self) -> u32

Source§

fn load(&self, _: Ordering) -> u32

Source§

fn store(&self, value: u32, _: Ordering)

Source§

fn swap(&self, value: u32, _: Ordering) -> u32

Source§

fn compare_and_swap(&self, current: u32, new: u32, _: Ordering) -> u32

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: u32, new: u32, _: Ordering, _: Ordering, ) -> Result<u32, u32>

Source§

fn compare_exchange_weak( &self, current: u32, new: u32, success: Ordering, failure: Ordering, ) -> Result<u32, u32>

Source§

fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u32, u32>
where F: FnMut(u32) -> Option<u32>,

Source§

fn fetch_and(&self, value: u32, _: Ordering) -> u32

Source§

fn fetch_nand(&self, value: u32, _: Ordering) -> u32

Source§

fn fetch_or(&self, value: u32, _: Ordering) -> u32

Source§

fn fetch_xor(&self, value: u32, _: Ordering) -> u32

Source§

fn fetch_add(&self, value: u32, _: Ordering) -> u32

Source§

fn fetch_sub(&self, value: u32, _: Ordering) -> u32

Source§

impl Radium for Cell<u64>

Source§

type Item = u64

Source§

fn new(value: u64) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut u64

Source§

fn into_inner(self) -> u64

Source§

fn load(&self, _: Ordering) -> u64

Source§

fn store(&self, value: u64, _: Ordering)

Source§

fn swap(&self, value: u64, _: Ordering) -> u64

Source§

fn compare_and_swap(&self, current: u64, new: u64, _: Ordering) -> u64

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: u64, new: u64, _: Ordering, _: Ordering, ) -> Result<u64, u64>

Source§

fn compare_exchange_weak( &self, current: u64, new: u64, success: Ordering, failure: Ordering, ) -> Result<u64, u64>

Source§

fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u64, u64>
where F: FnMut(u64) -> Option<u64>,

Source§

fn fetch_and(&self, value: u64, _: Ordering) -> u64

Source§

fn fetch_nand(&self, value: u64, _: Ordering) -> u64

Source§

fn fetch_or(&self, value: u64, _: Ordering) -> u64

Source§

fn fetch_xor(&self, value: u64, _: Ordering) -> u64

Source§

fn fetch_add(&self, value: u64, _: Ordering) -> u64

Source§

fn fetch_sub(&self, value: u64, _: Ordering) -> u64

Source§

impl Radium for Cell<usize>

Source§

type Item = usize

Source§

fn new(value: usize) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut usize

Source§

fn into_inner(self) -> usize

Source§

fn load(&self, _: Ordering) -> usize

Source§

fn store(&self, value: usize, _: Ordering)

Source§

fn swap(&self, value: usize, _: Ordering) -> usize

Source§

fn compare_and_swap(&self, current: usize, new: usize, _: Ordering) -> usize

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: usize, new: usize, _: Ordering, _: Ordering, ) -> Result<usize, usize>

Source§

fn compare_exchange_weak( &self, current: usize, new: usize, success: Ordering, failure: Ordering, ) -> Result<usize, usize>

Source§

fn fetch_update<F>( &self, _: Ordering, _: Ordering, f: F, ) -> Result<usize, usize>
where F: FnMut(usize) -> Option<usize>,

Source§

fn fetch_and(&self, value: usize, _: Ordering) -> usize

Source§

fn fetch_nand(&self, value: usize, _: Ordering) -> usize

Source§

fn fetch_or(&self, value: usize, _: Ordering) -> usize

Source§

fn fetch_xor(&self, value: usize, _: Ordering) -> usize

Source§

fn fetch_add(&self, value: usize, _: Ordering) -> usize

Source§

fn fetch_sub(&self, value: usize, _: Ordering) -> usize

Source§

impl Radium for AtomicBool

Source§

type Item = bool

Source§

fn new(value: bool) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut bool

Source§

fn into_inner(self) -> bool

Source§

fn load(&self, order: Ordering) -> bool

Source§

fn store(&self, value: bool, order: Ordering)

Source§

fn swap(&self, value: bool, order: Ordering) -> bool

Source§

fn compare_and_swap(&self, current: bool, new: bool, order: Ordering) -> bool

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: bool, new: bool, success: Ordering, failure: Ordering, ) -> Result<bool, bool>

Source§

fn compare_exchange_weak( &self, current: bool, new: bool, success: Ordering, failure: Ordering, ) -> Result<bool, bool>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<bool, bool>
where F: FnMut(bool) -> Option<bool>,

Source§

fn fetch_and(&self, value: bool, order: Ordering) -> bool

Source§

fn fetch_nand(&self, value: bool, order: Ordering) -> bool

Source§

fn fetch_or(&self, value: bool, order: Ordering) -> bool

Source§

fn fetch_xor(&self, value: bool, order: Ordering) -> bool

Source§

impl Radium for AtomicI8

Source§

type Item = i8

Source§

fn new(value: i8) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut i8

Source§

fn into_inner(self) -> i8

Source§

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

Source§

fn store(&self, value: i8, order: Ordering)

Source§

fn swap(&self, value: i8, order: Ordering) -> i8

Source§

fn compare_and_swap(&self, current: i8, new: i8, order: Ordering) -> i8

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: i8, new: i8, success: Ordering, failure: Ordering, ) -> Result<i8, i8>

Source§

fn compare_exchange_weak( &self, current: i8, new: i8, success: Ordering, failure: Ordering, ) -> Result<i8, i8>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<i8, i8>
where F: FnMut(i8) -> Option<i8>,

Source§

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

Source§

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

Source§

fn fetch_or(&self, value: i8, order: Ordering) -> i8

Source§

fn fetch_xor(&self, value: i8, order: Ordering) -> i8

Source§

fn fetch_add(&self, value: i8, order: Ordering) -> i8

Source§

fn fetch_sub(&self, value: i8, order: Ordering) -> i8

Source§

impl Radium for AtomicI16

Source§

type Item = i16

Source§

fn new(value: i16) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut i16

Source§

fn into_inner(self) -> i16

Source§

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

Source§

fn store(&self, value: i16, order: Ordering)

Source§

fn swap(&self, value: i16, order: Ordering) -> i16

Source§

fn compare_and_swap(&self, current: i16, new: i16, order: Ordering) -> i16

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: i16, new: i16, success: Ordering, failure: Ordering, ) -> Result<i16, i16>

Source§

fn compare_exchange_weak( &self, current: i16, new: i16, success: Ordering, failure: Ordering, ) -> Result<i16, i16>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<i16, i16>
where F: FnMut(i16) -> Option<i16>,

Source§

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

Source§

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

Source§

fn fetch_or(&self, value: i16, order: Ordering) -> i16

Source§

fn fetch_xor(&self, value: i16, order: Ordering) -> i16

Source§

fn fetch_add(&self, value: i16, order: Ordering) -> i16

Source§

fn fetch_sub(&self, value: i16, order: Ordering) -> i16

Source§

impl Radium for AtomicI32

Source§

type Item = i32

Source§

fn new(value: i32) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut i32

Source§

fn into_inner(self) -> i32

Source§

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

Source§

fn store(&self, value: i32, order: Ordering)

Source§

fn swap(&self, value: i32, order: Ordering) -> i32

Source§

fn compare_and_swap(&self, current: i32, new: i32, order: Ordering) -> i32

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: i32, new: i32, success: Ordering, failure: Ordering, ) -> Result<i32, i32>

Source§

fn compare_exchange_weak( &self, current: i32, new: i32, success: Ordering, failure: Ordering, ) -> Result<i32, i32>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<i32, i32>
where F: FnMut(i32) -> Option<i32>,

Source§

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

Source§

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

Source§

fn fetch_or(&self, value: i32, order: Ordering) -> i32

Source§

fn fetch_xor(&self, value: i32, order: Ordering) -> i32

Source§

fn fetch_add(&self, value: i32, order: Ordering) -> i32

Source§

fn fetch_sub(&self, value: i32, order: Ordering) -> i32

Source§

impl Radium for AtomicI64

Source§

type Item = i64

Source§

fn new(value: i64) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut i64

Source§

fn into_inner(self) -> i64

Source§

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

Source§

fn store(&self, value: i64, order: Ordering)

Source§

fn swap(&self, value: i64, order: Ordering) -> i64

Source§

fn compare_and_swap(&self, current: i64, new: i64, order: Ordering) -> i64

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: i64, new: i64, success: Ordering, failure: Ordering, ) -> Result<i64, i64>

Source§

fn compare_exchange_weak( &self, current: i64, new: i64, success: Ordering, failure: Ordering, ) -> Result<i64, i64>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<i64, i64>
where F: FnMut(i64) -> Option<i64>,

Source§

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

Source§

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

Source§

fn fetch_or(&self, value: i64, order: Ordering) -> i64

Source§

fn fetch_xor(&self, value: i64, order: Ordering) -> i64

Source§

fn fetch_add(&self, value: i64, order: Ordering) -> i64

Source§

fn fetch_sub(&self, value: i64, order: Ordering) -> i64

Source§

impl Radium for AtomicIsize

Source§

type Item = isize

Source§

fn new(value: isize) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut isize

Source§

fn into_inner(self) -> isize

Source§

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

Source§

fn store(&self, value: isize, order: Ordering)

Source§

fn swap(&self, value: isize, order: Ordering) -> isize

Source§

fn compare_and_swap(&self, current: isize, new: isize, order: Ordering) -> isize

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: isize, new: isize, success: Ordering, failure: Ordering, ) -> Result<isize, isize>

Source§

fn compare_exchange_weak( &self, current: isize, new: isize, success: Ordering, failure: Ordering, ) -> Result<isize, isize>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<isize, isize>
where F: FnMut(isize) -> Option<isize>,

Source§

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

Source§

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

Source§

fn fetch_or(&self, value: isize, order: Ordering) -> isize

Source§

fn fetch_xor(&self, value: isize, order: Ordering) -> isize

Source§

fn fetch_add(&self, value: isize, order: Ordering) -> isize

Source§

fn fetch_sub(&self, value: isize, order: Ordering) -> isize

Source§

impl Radium for AtomicU8

Source§

type Item = u8

Source§

fn new(value: u8) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut u8

Source§

fn into_inner(self) -> u8

Source§

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

Source§

fn store(&self, value: u8, order: Ordering)

Source§

fn swap(&self, value: u8, order: Ordering) -> u8

Source§

fn compare_and_swap(&self, current: u8, new: u8, order: Ordering) -> u8

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: u8, new: u8, success: Ordering, failure: Ordering, ) -> Result<u8, u8>

Source§

fn compare_exchange_weak( &self, current: u8, new: u8, success: Ordering, failure: Ordering, ) -> Result<u8, u8>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<u8, u8>
where F: FnMut(u8) -> Option<u8>,

Source§

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

Source§

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

Source§

fn fetch_or(&self, value: u8, order: Ordering) -> u8

Source§

fn fetch_xor(&self, value: u8, order: Ordering) -> u8

Source§

fn fetch_add(&self, value: u8, order: Ordering) -> u8

Source§

fn fetch_sub(&self, value: u8, order: Ordering) -> u8

Source§

impl Radium for AtomicU16

Source§

type Item = u16

Source§

fn new(value: u16) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut u16

Source§

fn into_inner(self) -> u16

Source§

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

Source§

fn store(&self, value: u16, order: Ordering)

Source§

fn swap(&self, value: u16, order: Ordering) -> u16

Source§

fn compare_and_swap(&self, current: u16, new: u16, order: Ordering) -> u16

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: u16, new: u16, success: Ordering, failure: Ordering, ) -> Result<u16, u16>

Source§

fn compare_exchange_weak( &self, current: u16, new: u16, success: Ordering, failure: Ordering, ) -> Result<u16, u16>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<u16, u16>
where F: FnMut(u16) -> Option<u16>,

Source§

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

Source§

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

Source§

fn fetch_or(&self, value: u16, order: Ordering) -> u16

Source§

fn fetch_xor(&self, value: u16, order: Ordering) -> u16

Source§

fn fetch_add(&self, value: u16, order: Ordering) -> u16

Source§

fn fetch_sub(&self, value: u16, order: Ordering) -> u16

Source§

impl Radium for AtomicU32

Source§

type Item = u32

Source§

fn new(value: u32) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut u32

Source§

fn into_inner(self) -> u32

Source§

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

Source§

fn store(&self, value: u32, order: Ordering)

Source§

fn swap(&self, value: u32, order: Ordering) -> u32

Source§

fn compare_and_swap(&self, current: u32, new: u32, order: Ordering) -> u32

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: u32, new: u32, success: Ordering, failure: Ordering, ) -> Result<u32, u32>

Source§

fn compare_exchange_weak( &self, current: u32, new: u32, success: Ordering, failure: Ordering, ) -> Result<u32, u32>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<u32, u32>
where F: FnMut(u32) -> Option<u32>,

Source§

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

Source§

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

Source§

fn fetch_or(&self, value: u32, order: Ordering) -> u32

Source§

fn fetch_xor(&self, value: u32, order: Ordering) -> u32

Source§

fn fetch_add(&self, value: u32, order: Ordering) -> u32

Source§

fn fetch_sub(&self, value: u32, order: Ordering) -> u32

Source§

impl Radium for AtomicU64

Source§

type Item = u64

Source§

fn new(value: u64) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut u64

Source§

fn into_inner(self) -> u64

Source§

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

Source§

fn store(&self, value: u64, order: Ordering)

Source§

fn swap(&self, value: u64, order: Ordering) -> u64

Source§

fn compare_and_swap(&self, current: u64, new: u64, order: Ordering) -> u64

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: u64, new: u64, success: Ordering, failure: Ordering, ) -> Result<u64, u64>

Source§

fn compare_exchange_weak( &self, current: u64, new: u64, success: Ordering, failure: Ordering, ) -> Result<u64, u64>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<u64, u64>
where F: FnMut(u64) -> Option<u64>,

Source§

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

Source§

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

Source§

fn fetch_or(&self, value: u64, order: Ordering) -> u64

Source§

fn fetch_xor(&self, value: u64, order: Ordering) -> u64

Source§

fn fetch_add(&self, value: u64, order: Ordering) -> u64

Source§

fn fetch_sub(&self, value: u64, order: Ordering) -> u64

Source§

impl Radium for AtomicUsize

Source§

type Item = usize

Source§

fn new(value: usize) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut usize

Source§

fn into_inner(self) -> usize

Source§

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

Source§

fn store(&self, value: usize, order: Ordering)

Source§

fn swap(&self, value: usize, order: Ordering) -> usize

Source§

fn compare_and_swap(&self, current: usize, new: usize, order: Ordering) -> usize

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: usize, new: usize, success: Ordering, failure: Ordering, ) -> Result<usize, usize>

Source§

fn compare_exchange_weak( &self, current: usize, new: usize, success: Ordering, failure: Ordering, ) -> Result<usize, usize>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<usize, usize>
where F: FnMut(usize) -> Option<usize>,

Source§

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

Source§

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

Source§

fn fetch_or(&self, value: usize, order: Ordering) -> usize

Source§

fn fetch_xor(&self, value: usize, order: Ordering) -> usize

Source§

fn fetch_add(&self, value: usize, order: Ordering) -> usize

Source§

fn fetch_sub(&self, value: usize, order: Ordering) -> usize

Source§

impl<T> Radium for Cell<*mut T>

Source§

type Item = *mut T

Source§

fn new(value: *mut T) -> Self

Source§

fn fence(_: Ordering)

Source§

fn get_mut(&mut self) -> &mut *mut T

Source§

fn into_inner(self) -> *mut T

Source§

fn load(&self, _: Ordering) -> *mut T

Source§

fn store(&self, value: *mut T, _: Ordering)

Source§

fn swap(&self, value: *mut T, _: Ordering) -> *mut T

Source§

fn compare_and_swap(&self, current: *mut T, new: *mut T, _: Ordering) -> *mut T

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: *mut T, new: *mut T, _: Ordering, _: Ordering, ) -> Result<*mut T, *mut T>

Source§

fn compare_exchange_weak( &self, current: *mut T, new: *mut T, success: Ordering, failure: Ordering, ) -> Result<*mut T, *mut T>

Source§

fn fetch_update<F>( &self, _: Ordering, _: Ordering, f: F, ) -> Result<*mut T, *mut T>
where F: FnMut(*mut T) -> Option<*mut T>,

Source§

impl<T> Radium for AtomicPtr<T>

Source§

type Item = *mut T

Source§

fn new(value: *mut T) -> Self

Source§

fn fence(order: Ordering)

Source§

fn get_mut(&mut self) -> &mut *mut T

Source§

fn into_inner(self) -> *mut T

Source§

fn load(&self, order: Ordering) -> *mut T

Source§

fn store(&self, value: *mut T, order: Ordering)

Source§

fn swap(&self, value: *mut T, order: Ordering) -> *mut T

Source§

fn compare_and_swap( &self, current: *mut T, new: *mut T, order: Ordering, ) -> *mut T

👎Deprecated: Use compare_exchange or compare_exchange_weak instead
Source§

fn compare_exchange( &self, current: *mut T, new: *mut T, success: Ordering, failure: Ordering, ) -> Result<*mut T, *mut T>

Source§

fn compare_exchange_weak( &self, current: *mut T, new: *mut T, success: Ordering, failure: Ordering, ) -> Result<*mut T, *mut T>

Source§

fn fetch_update<F>( &self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<*mut T, *mut T>
where F: FnMut(*mut T) -> Option<*mut T>,

Implementors§