[][src]Module pui_arena::base::sparse

Sparse Arenas - Fast Access, Slow Iteration, Fast Mutation, Small memory footprint

A sparse arena has a minimal footprint, it stores a linked-list of empty slots embeded in the same location as the values, so as long as the size of you values is greater than or equal to usize, then there is no memory overhead. This linked-list of empty slots means that insertion and deletion are O(1) operations.

Each slot is versioned by using Version trait. See Version for docs on version exhaustion. Once a slot's version exhausts, it will not be pushed onto the linked list. This prevents it from ever being used again.

Structs

Arena

A sparse arena

Drain

Returned by Arena::drain

DrainFilter

Returned by Arena::drain_filter

Entries

Returned by Arena::entries

EntriesMut

Returned by Arena::entries_mut

IntoEntries

Returned by Arena::into_entries

IntoIter

Returned by Arena::into_iter

Iter

Returned by Arena::iter

IterMut

Returned by Arena::iter_mut

Keys

Returned by Arena::keys

VacantEntry

An empty slot in a sparse arena