Go to file
i509VCB 7c85b93627
add try_ functions for fallible heap growth (#158)
* add try_ functions for fallible heap growth

* tests for try_ functions
2022-04-20 12:43:34 -06:00
.github/workflows Fix building on Rust 1.34 with alloc feature enabled (#154) 2021-11-09 12:25:23 -07:00
benches Benchmarks comparing TinyVec to SmallVec (#150) 2021-09-26 13:03:06 -06:00
fuzz rustfmt 2020-10-13 12:16:40 -06:00
src add try_ functions for fallible heap growth (#158) 2022-04-20 12:43:34 -06:00
src-backup Formally move the arrayset into a backup folder. It will become a separate crate some day. 2020-08-08 19:04:39 -06:00
tests add try_ functions for fallible heap growth (#158) 2022-04-20 12:43:34 -06:00
.gitignore base files 2020-01-06 19:29:40 -07:00
Cargo.toml add try_ functions for fallible heap growth (#158) 2022-04-20 12:43:34 -06:00
CHANGELOG.md changelog. 2021-11-09 12:27:30 -07:00
compare_benchmarks.py Benchmarks comparing TinyVec to SmallVec (#150) 2021-09-26 13:03:06 -06:00
gen-array-impls.sh Replace A: Default bounds by a constructor on Array (#112) 2020-08-17 10:55:51 -06:00
LICENSE-APACHE.md Replace LICENSE-APACHE.md with official text (#140) 2021-04-01 17:16:10 -06:00
LICENSE-MIT.md add license files (#120) 2020-10-11 18:42:11 -06:00
LICENSE-ZLIB.md base files 2020-01-06 19:29:40 -07:00
README.md Cratesio fix (#104) 2020-08-09 09:13:26 -06:00
rustfmt.toml improve clone impl as per https://github.com/Lokathor/tinyvec/issues/143 (#144) 2021-07-21 18:11:46 -06:00

License:Zlib Minimum Rust Version crates.io docs.rs

Unsafe-Zero-Percent

tinyvec

A 100% safe crate of vec-like types. #![forbid(unsafe_code)]

Main types are as follows:

  • ArrayVec is an array-backed vec-like data structure. It panics on overflow.
  • SliceVec is the same deal, but using a &mut [T].
  • TinyVec (alloc feature) is an enum that's either an Inline(ArrayVec) or a Heap(Vec). If a TinyVec is Inline and would overflow it automatically transitions to Heap and continues whatever it was doing.

To attain this "100% safe code" status there is one compromise: the element type of the vecs must implement Default.

For more details, please see the docs.rs documentation