Expand description
TinyVec<T, N> — a hybrid stack/heap vector optimised for small sizes.
Up to N elements are stored inline in a fixed-size array on the stack.
When the number of elements exceeds N the backing storage automatically
spills onto the heap and the inline array is abandoned.
§Design goals
- Zero heap allocation for collections that stay within
Nelements. - Transparent API that mirrors
Vec<T>for push / pop / index / iter. - No
unsafeneeded for the API — theMaybeUninitusage is fully contained in this module and carefully justified.
Structs§
- TinyVec
- A hybrid stack/heap vector.