Trait radium::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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Radium for Cell<bool>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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>

§

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>

§

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§