Struct atomic_box::AtomicBox [] [src]

pub struct AtomicBox<T> { /* fields omitted */ }

A struct which allows multiple threads to safely update and read from a shared non-nullable pointer to heap data

Methods

impl<T> AtomicBox<T>
[src]

Create a new atomic box from data

Get an Arc<T> pointing to the value currently stored in the box

Update the value stored in the box to point to data, the previous data will be reclaimed once the last reader has dropped their reference.

Swap the current value with data, returning a boxed Arc<T> pointing to the old value

Trait Implementations

impl<T> Drop for AtomicBox<T>
[src]

A method called when the value goes out of scope. Read more

impl<T> Debug for AtomicBox<T> where
    T: Debug
[src]

Formats the value using the given formatter.