#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

#2632 in Data structures

Download history 52098/week @ 2024-11-17 50852/week @ 2024-11-24 49504/week @ 2024-12-01 57282/week @ 2024-12-08 51406/week @ 2024-12-15 22706/week @ 2024-12-22 30050/week @ 2024-12-29 51215/week @ 2025-01-05 71050/week @ 2025-01-12 63052/week @ 2025-01-19 55763/week @ 2025-01-26 57549/week @ 2025-02-02 62713/week @ 2025-02-09 63857/week @ 2025-02-16 57199/week @ 2025-02-23 58057/week @ 2025-03-02

245,735 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