#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

#1816 in Data structures

Download history 19706/week @ 2024-06-11 21815/week @ 2024-06-18 24178/week @ 2024-06-25 23748/week @ 2024-07-02 21749/week @ 2024-07-09 31195/week @ 2024-07-16 34824/week @ 2024-07-23 24913/week @ 2024-07-30 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 27097/week @ 2024-09-24

155,176 downloads per month
Used in 22 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