Cryptjar 36ff7fdf6b Add a from_array_empty constructor which is a const fn. (#141)
Also lifts the `A: Array` constraint on ArrayVec as it was not used yet
and would otherwise conflict with the const fn, which currently (Rust 1.51)
may not have any trait constraints.

Since this commit only adds a new function and lifts a constraint, this
should be perfectly backwards compatible.
2021-04-04 09:13:15 -06:00
2020-10-13 12:16:40 -06:00
2020-01-06 19:29:40 -07:00
2021-01-25 17:35:03 -07:00
2020-10-11 18:42:11 -06:00
2020-01-06 19:29:40 -07:00
2020-08-09 09:13:26 -06:00
2020-08-18 23:53:29 -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

S
Description
安全的 vec-like 类型库
Readme 845 KiB
Languages
Rust 99.5%
Python 0.3%
Shell 0.2%