Struct atomic_array::AtomicOptionRefArray[][src]

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

An array of references in which elements may be updated and retrieved atomically.

This is a Rust interpretation of AtomicReferenceArray from Java.

Methods

impl<T> AtomicOptionRefArray<T>
[src]

Constructs a new array with the specified length. All values will be None.

Constructs a new array with the specified length. Uses the given function to construct each value.

Returns the number of elements in the array.

Returns true if the array has a length of 0.

Loads and returns a reference to an value at the given position or None if the value at the index is not set.

Panics if index is out of bounds.

Stores the value at the given position.

Panics if index is out of bounds.

Swaps the value at the given position, returning the previous value.

Panics if index is out of bounds.

Auto Trait Implementations

impl<T> Send for AtomicOptionRefArray<T>

impl<T> Sync for AtomicOptionRefArray<T>