#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

#1824 in Data structures

Download history 30971/week @ 2024-07-21 28282/week @ 2024-07-28 30481/week @ 2024-08-04 41811/week @ 2024-08-11 28743/week @ 2024-08-18 40712/week @ 2024-08-25 47865/week @ 2024-09-01 39106/week @ 2024-09-08 33680/week @ 2024-09-15 35453/week @ 2024-09-22 37284/week @ 2024-09-29 45133/week @ 2024-10-06 47313/week @ 2024-10-13 54127/week @ 2024-10-20 43562/week @ 2024-10-27 55365/week @ 2024-11-03

202,816 downloads per month
Used in 68 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