#vector #stash #actor #index #arena

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

#2029 in Data structures

Download history 51105/week @ 2024-12-02 57008/week @ 2024-12-09 50583/week @ 2024-12-16 23074/week @ 2024-12-23 30112/week @ 2024-12-30 51159/week @ 2025-01-06 74052/week @ 2025-01-13 60932/week @ 2025-01-20 53820/week @ 2025-01-27 58600/week @ 2025-02-03 63515/week @ 2025-02-10 63623/week @ 2025-02-17 56893/week @ 2025-02-24 60483/week @ 2025-03-03 63789/week @ 2025-03-10 57342/week @ 2025-03-17

242,200 downloads per month
Used in 122 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