#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

#1990 in Data structures

Download history 32656/week @ 2024-08-06 39219/week @ 2024-08-13 30629/week @ 2024-08-20 43633/week @ 2024-08-27 47593/week @ 2024-09-03 37105/week @ 2024-09-10 34025/week @ 2024-09-17 34102/week @ 2024-09-24 40632/week @ 2024-10-01 45634/week @ 2024-10-08 50894/week @ 2024-10-15 50100/week @ 2024-10-22 45563/week @ 2024-10-29 54804/week @ 2024-11-05 49597/week @ 2024-11-12 50965/week @ 2024-11-19

210,683 downloads per month
Used in 81 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