Crates.io | flatvec |
lib.rs | flatvec |
version | 0.3.0 |
source | src |
created_at | 2020-10-13 23:19:11.789696 |
updated_at | 2021-10-30 01:45:04.701574 |
description | An indirection-collapsing container that stores all its elements in at most 2 allocations |
homepage | |
repository | https://github.com/saethlin/flatvec |
max_upload_size | |
id | 299413 |
size | 33,865 |
An indirection-collapsing container that generalizes from nested.
This crate provides a container FlatVec
and two traits, IntoFlat
and FromFlat
. A FlatVec
is parameterized on one type, and IntoFlat
and FromFlat
are both parameterized on two types. None of these type parameters need to be the same.
This permits collapsing indirections while also permitting minimal/zero-copy usage, as demonstrated in examples/domain_name.rs
.
This interface also permits some interesting other applications, as in examples/gzip.rs
.