Crates.io | triple_arena |
lib.rs | triple_arena |
version | 0.13.0 |
source | src |
created_at | 2021-06-02 04:30:28.909045 |
updated_at | 2024-02-20 19:37:13.354668 |
description | Regular, Chain, Surjection, and Ordered Arenas supporting non-Clone types, deletion, and more |
homepage | |
repository | https://github.com/AaronKutch/triple_arena |
max_upload_size | |
id | 405120 |
size | 371,114 |
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 most BTreeMap
s and HashMap
s, the P: Ptr
references to entries are stable,
and can be trivially reused for O(1)
operations.