spare_buffer 0.1.1

A wrapper around Vec that provides access to the “spare” capacity of the vector as a mutable slice.
Documentation
  • Coverage
  • 60%
    3 out of 5 items documented1 out of 1 items with examples
  • Size
  • Source code size: 14.69 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.75 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • dEajL3kA/spare_buffer
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dEajL3kA

Spare Buffer

Crates.io Unlicense

A wrapper around Vec<T> that provides access to the "spare" capacity of the vector as a &mut[T] slice.

Useful to allocate "spare" capacity at the end of the underlying vector and fill it directly, e.g. by read()ing from a file or stream, without initialize the memory first. Once filled, the vector can be "extended" into the previously allocated spare capacity.

Crates.io:
https://crates.io/crates/spare_buffer

API Documentation:
https://docs.rs/spare_buffer/latest/index.html

Examples:
https://github.com/dEajL3kA/spare_buffer/tree/master/examples