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 get(&self) -> Arc<T>
[src]
pub fn replace_with<F>(&self, f: F) where
F: Fn(Arc<T>) -> T,
[src]
F: Fn(Arc<T>) -> T,
Atomically replace the inner value with the result of applying the given closure to the current value
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 !=
.