| Crates.io | small_vec |
| lib.rs | small_vec |
| version | 0.1.2 |
| created_at | 2021-08-15 16:56:43.582065+00 |
| updated_at | 2021-09-05 20:02:33.376682+00 |
| description | vector optimized for small buffers |
| homepage | |
| repository | https://github.com/m-rinaldi/small_vec/ |
| max_upload_size | |
| id | 437380 |
| size | 8,914 |
A dynamic array or vector supporting small buffer optimization.
SmallVec<T, N> is, in essence, just an enum with two variants:
LocalBuf: a buffer allocated locally inside the SmallVec itself.
RemoteBuf: a Vec<T>, i.e., a remote buffer allocated on the heap.
The capacity of the local buffer is specified at compile time as a constant generic argument to SmallVec thanks to const generics.