| Crates.io | spare_buffer |
| lib.rs | spare_buffer |
| version | 0.1.1 |
| created_at | 2023-02-13 17:41:14.111693+00 |
| updated_at | 2023-02-14 11:01:50.777683+00 |
| description | A wrapper around Vec that provides access to the “spare” capacity of the vector as a mutable slice. |
| homepage | https://crates.io/crates/spare_buffer |
| repository | https://github.com/dEajL3kA/spare_buffer |
| max_upload_size | |
| id | 784142 |
| size | 15,157 |
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