Crate triple_arena
source ·Expand description
Note: there are “std” and “serde_support” feature flags
Modules§
- Iterators for
Arena
- Iterators for
ChainArena
- Iterators for
OrdArena
- Iterators for
SurjectArena
- Special utilities for advanced usage
Macros§
- Convenience macro for quickly making new structs that implement
Ptr
. The index and generation types can be changed to be smaller for less memory footprint in exchange for smaller maximum arena capacity and generations.
Structs§
- An arena supporting non-Clone
T
(T
has no requirements other thanSized
, but some traits are only active ifT
implements them), deletion, and optional generation counters. - A doubly-linked-list based on an arena for handling usecases involving
O(1)
insertion, deletion, and other functions on linear lists of elements that we call “chains” of “links”. Multiple separate chains and cyclical chains are supported. - This represents a link in a
ChainArena
that has a publict: T
field andOption<Ptr<P>>
interlinks to the previous and next links. - An Ordered Arena with three parameters: a
P: Ptr
type that gives single indirection access to elements, aK: Ord
key type that is used to define an ordering among elements, and aV
value type that is not ordered over but is associated with eachK
.O(log n)
insertions, finds, and deletions are guaranteed. - A generalization of an
Arena
with three parameters: aP: Ptr
type, aK
key type, and aV
value type. EachP
points to a singleK
like in a normal arena, but multipleP
can point to a singleV
in a surjective map structure. When allPtr
s to a singleV
are removed, theV
is removed as well. Efficient union-find functionality is also possible.
Traits§
- A different kind of iterator that does not borrow the collection.
- A trait that encapsulates some common functions across the different arena types. Intended for functions that want to be generic over the arenas.
- A trait containing index and generation information for the
Arena
type. - A trait implemented for structures that have
Item
s that should beRecast
ed by aRecaster
. - A trait implemented for structures that can act as a
Recaster
inRecast
ingItem
s.