16 releases (breaking)
0.13.0 | Feb 20, 2024 |
---|---|
0.12.1 | Aug 29, 2023 |
0.11.0 | Aug 20, 2023 |
0.9.0 | Jun 5, 2023 |
0.1.0 | Jun 2, 2021 |
#149 in Memory management
222 downloads per month
Used in 9 crates
(3 directly)
365KB
7K
SLoC
Triple Arena
Provides 4 very flexible arena types. All support non-Clone entry insertion and deletion.
All are indexable with a P: Ptr
generic, which contains an optional
generation counter to check for invalidity (zero cost when omitted). no_std
compatible.
Arena<P, T>
is the basic unassociated and nonhereditary arena typeChainArena<P, T>
allows associating entries together into multiple linear or cyclic chains, representing an idealized doubly linked list stored on an arenaSurjectArena<P, K, V>
is a special kind of union-find data structure that can associate key entries into nonhereditary sets with a common value entryOrdArena<P, K, V>
is a fusion between an ordered balanced tree and an arena. All entries are key and value pairs that are all ordered by the key. Hereditary and nonhereditary insertion is supported. Unlike mostBTreeMap
s andHashMap
s, theP: Ptr
references to entries are stable, and can be trivially reused forO(1)
operations.