singlevec

Crates.iosinglevec
lib.rssinglevec
version
sourcesrc
created_at2024-06-03 15:27:23.921209+00
updated_at2025-03-07 16:24:31.930343+00
descriptionVec-like container optimized for storing only a single item
homepagehttps://github.com/tuffy/singlevec
repositoryhttps://github.com/tuffy/singlevec
max_upload_size
id1260214
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(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