[][src]Module heaparray::base

Module for simple heap arrays. ThinPtrArray and AtomicPtrArray are a single word on the stack, whereas FatPtrArray is a 2-word struct.

Modules

iter

Iterators for the arrays in heaparray::base

Structs

AtomicPtrArray

Heap-allocated array, with array size stored alongside the memory block itself. Doesn't implement Sync because CAS operations on the pointer create a race condition between the time the pointer is read and dereferenced. This can be fixed using reference counting.

FatPtrArray

Heap-allocated array, with array size stored with the pointer to the memory.

ThinPtrArray

Heap-allocated array, with array size stored alongside the memory block itself.

Traits

ArrayRef

A reference to an array, whose clone points to the same data.

AtomicArrayRef

Atomically modified array reference. Guarrantees that all operations on the array reference are atomic (i.e. all changes to the internal array pointer). Additionally, guarrantees that all reads to a reference of this pointer use atomic loads.

BaseArrayRef

A basic reference to a heap-allocated array. Should be paired with exactly one of either heaparray::UnsafeArrayRef or heaparray::ArrayRef.

Container

Trait for a simple container.

CopyMap

Trait for a container indexed by a value that implements Copy and Eq.

DefaultLabelledArray

Trait for a labelled array with a default value.

LabelledArray

Array with an optional label struct stored next to the data.

LabelledArrayMut

Array with optional label struct stored next to the data that can be mutated

LabelledArrayRefMut

Array with optional label struct stored next to the data that can be conditionally mutated.

MakeArray

An array of arbitrary (sized) values that can be safely initialized.

SliceArray

Array that returns slices into its contents

SliceArrayRef

Array reference that can return a slice into its contents.