generic-arrayvec

Crates.iogeneric-arrayvec
lib.rsgeneric-arrayvec
version0.4.0
sourcesrc
created_at2018-07-15 03:47:31.397731
updated_at2022-07-27 06:21:37.988659
descriptionInterop between the arrayvec and generic_array crates
homepage
repositoryhttps://github.com/Seeker14491/generic-arrayvec
max_upload_size
id74291
size31,456
Brian Bowman (Seeker14491)

documentation

README

generic-arrayvec

Build status

This crate provides interop between the arrayvec v0.5 and generic_array crates, allowing you to use generic_array's GenericArray datatype as the backing storage for the data structures in arrayvec. This lets you have vector and string types that store their contents inline, with a capacity that can be referred to in generic code.

Note that as of its v0.6 release, arrayvec uses Rust's const generics feature to implement functionality similar to this crate but with better ergonomics, so you may not need this crate anymore. Still, const generics currently has some limitations on stable Rust which the approach this crate uses does not, so this crate can still be useful. Also, this crate can be a bit more memory efficient due to its vectors storing their length using 1 byte when capacity < 2^8, 2 bytes when capacity < 2^16, etc; in comparison arrayvec as of v0.7.2 always uses 4 bytes for this.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 22

cargo fmt