singlevec

Crates.iosinglevec
lib.rssinglevec
version1.6.0
sourcesrc
created_at2024-06-03 15:27:23.921209
updated_at2024-10-21 17:03:06.343798
descriptionVec-like container optimized for storing only a single item
homepagehttps://github.com/tuffy/singlevec
repositoryhttps://github.com/tuffy/singlevec
max_upload_size
id1260214
size34,062
(tuffy)

documentation

README

singlevec

For when you need a Vec, but intend to store only one item most of the time. In that case, that single item can be stored on the stack and will fall back to heap storage for multiple items.

Like a tinyvec::TinyVec<[T; 1]> that shares methods in common with both Vec and Option.

Simple and 100% safe code for a simple use case.

Commit count: 16

cargo fmt