You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
3 years ago | |
|---|---|---|
| .. | ||
| .github/workflows | 3 years ago | |
| benches | 3 years ago | |
| patches | 3 years ago | |
| src | 3 years ago | |
| src-backup | 3 years ago | |
| tests | 3 years ago | |
| .cargo_vcs_info.json | 3 years ago | |
| .gitignore | 3 years ago | |
| Android.bp | 3 years ago | |
| CHANGELOG.md | 3 years ago | |
| Cargo.toml | 3 years ago | |
| Cargo.toml.orig | 3 years ago | |
| LICENSE | 3 years ago | |
| LICENSE-APACHE.md | 3 years ago | |
| LICENSE-MIT.md | 3 years ago | |
| LICENSE-ZLIB.md | 3 years ago | |
| METADATA | 3 years ago | |
| MODULE_LICENSE_APACHE2 | 3 years ago | |
| OWNERS | 3 years ago | |
| README.md | 3 years ago | |
| TEST_MAPPING | 3 years ago | |
| cargo2android.json | 3 years ago | |
| gen-array-impls.sh | 3 years ago | |
| rustfmt.toml | 3 years ago | |
README.md
tinyvec
A 100% safe crate of vec-like types. #![forbid(unsafe_code)]
Main types are as follows:
ArrayVecis an array-backed vec-like data structure. It panics on overflow.SliceVecis the same deal, but using a&mut [T].TinyVec(allocfeature) is an enum that's either anInline(ArrayVec)or aHeap(Vec). If aTinyVecisInlineand would overflow it automatically transitions toHeapand 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