Crate dst[][src]

This crate is intended to provide data structures that use DSTs (dynamically sized types).

Overview

The goal of this crate is to provide data structures that can store DSTs in a contiguous allocation. Some applications may have a performance benefit for using a contiguous allocation as opposed to multiple pointers.

Currently, the only implementation is a Vec where the DST-tails are slices of the same length.

Structs

FixedVec

Imitates a std::vec::Vec of a slice-based DST. All values have the same slice length, which allows random-access. Guarantied to store all values inline in the same allocation (sequentially), only using extra space for inherent alignment-padding. The trade-off is that the slice-lengths of the dynamically sized tail must all be the same, and is stored alongside the pointer to the allocation/length/capacity. Thus, this Vec is 4-words instead of 3-words.

FixedVecIter
FixedVecIterMut
Handle

This struct contains a value and the unsized-tail. It cannot be normally instantiated.