zerobuf

Crates.iozerobuf
lib.rszerobuf
version0.0.3
sourcesrc
created_at2018-12-12 01:57:36.284288
updated_at2020-09-05 17:41:34.48513
descriptionA growable chunk of zeroed memory.
homepage
repositoryhttps://github.com/badel2/zerobuf
max_upload_size
id101540
size33,412
(Badel2)

documentation

https://docs.rs/zerobuf

README

zerobuf

A growable chunk of zeroed memory

Crates.io License MIT-APACHE Build Status

Like a Vec where len == capacity. It can be used as an alternative to a Vec when the length is controlled externally. RawVec but the memory is always initializated.

Features

  • Slice API: use a ZeroBuf<T> as you would use a [T].
  • grow method, to automatically increase capacity (with a configurable strategy).
  • Ability to define drop strategy.
  • Panic on error: assume that memory allocation cannot fail.
  • Support for zero-sized types.

Use cases

  • As a buffer
  • Define a custom Vec-like container

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 10

cargo fmt