#vector #arena #stash #index #actor

no-std multi-stash

Vector-based arena data structure that reuses vacant slots

2 unstable releases

0.2.0 Nov 18, 2023
0.1.0 Nov 17, 2023

#2074 in Data structures

Download history 37368/week @ 2024-09-11 35199/week @ 2024-09-18 31066/week @ 2024-09-25 44232/week @ 2024-10-02 45149/week @ 2024-10-09 52972/week @ 2024-10-16 48012/week @ 2024-10-23 50935/week @ 2024-10-30 50549/week @ 2024-11-06 50492/week @ 2024-11-13 51542/week @ 2024-11-20 48634/week @ 2024-11-27 54216/week @ 2024-12-04 51900/week @ 2024-12-11 42619/week @ 2024-12-18 24295/week @ 2024-12-25

182,831 downloads per month
Used in 95 crates (2 directly)

MIT/Apache

29KB
628 lines

MultiStash

A vector-like data structure that is able to reuse slots for new elements.

Specifically allows for (armortized) O(1) instructions for:

  • MultiStash::put
  • MultiStash::take_one
  • MultiStash::take_all
  • MultiStash::get
  • MultiStash::get_mut

License

multi-stash is primarily distributed under the terms of both the MIT license and the APACHE license (Version 2.0), at your choice.

See LICENSE-APACHE and LICENSE-MIT for details.

No runtime deps