add fancy indexing and getting

This commit is contained in:
nora 2021-12-21 12:04:42 +01:00
parent 54bbbbaa6d
commit c49c716c9a
2 changed files with 67 additions and 10 deletions

View file

@ -4,7 +4,7 @@ It's implemented by laying out the elements in memory contiguously like `alloc::
# Layout
A `Vechonk` is 3 `usize` long. It owns a single allocation, containing the elements and the metadata.
A `Vechonk` is 4 `usize` long. It owns a single allocation, containing the elements and the metadata.
The elements are laid out contiguously from the front, while the metadata is laid out contiguously from the back.
Both grow towards the center until they meet and get realloced to separate them again.