small_vec

Crates.iosmall_vec
lib.rssmall_vec
version0.1.2
sourcesrc
created_at2021-08-15 16:56:43.582065
updated_at2021-09-05 20:02:33.376682
descriptionvector optimized for small buffers
homepage
repositoryhttps://github.com/m-rinaldi/small_vec/
max_upload_size
id437380
size8,914
J. Rinaldi (m-rinaldi)

documentation

README

small_vec

A dynamic array or vector supporting small buffer optimization.

License: MIT Build Status


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.

Commit count: 11

cargo fmt