Struct abox::AtomicBox
[−]
[src]
pub struct AtomicBox<T: Sized> { /* fields omitted */ }
AtomicBox
Methods
impl<T: Sized> AtomicBox<T>
[src]
pub fn new(value: T) -> AtomicBox<T>
[src]
Allocates a new AtomicBox containing the given value
pub fn replace_with<F>(&self, f: F) where
F: Fn(&T) -> T,
[src]
F: Fn(&T) -> T,
Atomically replace the inner value with the result of applying the given closure to the current value, this closure might be executed multiple times if the value was swapped concurrently
Trait Implementations
impl<T: Debug + Sized> Debug for AtomicBox<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T: Sized + PartialEq> PartialEq for AtomicBox<T>
[src]
fn eq(&self, other: &AtomicBox<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T: Sized> Clone for AtomicBox<T>
[src]
fn clone(&self) -> AtomicBox<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Sized> Deref for AtomicBox<T>
[src]
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.