Crate slots

source · []
Expand description

This crate provides a heapless, fixed size, unordered data structure, inspired by SlotMap.

The following basic operations (all of them O(1)) are defined for Slots:

  • Store: store data and retrieve a handle for later access
  • Read, modify: use the given handle to access the data without removal
  • Take: use the given handle to remove data

There are two variations of this data structure:

  • Slots, where elements can only be modified using a Key that can’t be copied
  • UnrestrictedSlots, where elements are free to be modified by anyone

Modules

Slots object that provides strict access control for the stored data.

Slots object that provides an unrestricted access control for the stored data.