#stash #vector #arena #actor #index

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

#2097 in Data structures

Download history 57549/week @ 2025-02-02 62713/week @ 2025-02-09 63857/week @ 2025-02-16 57199/week @ 2025-02-23 61059/week @ 2025-03-02 63692/week @ 2025-03-09 60184/week @ 2025-03-16 68486/week @ 2025-03-23 63325/week @ 2025-03-30 67296/week @ 2025-04-06 52381/week @ 2025-04-13 64043/week @ 2025-04-20 60076/week @ 2025-04-27 57802/week @ 2025-05-04 56764/week @ 2025-05-11 59108/week @ 2025-05-18

236,624 downloads per month
Used in 172 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