5 releases (3 breaking)

0.5.0 Jul 3, 2024
0.4.1 Jul 3, 2024
0.3.0 Mar 25, 2024
0.2.2 Mar 20, 2024
0.1.0 Mar 20, 2024

#10 in #owned

Download history 8/week @ 2024-09-11 4/week @ 2024-09-18 23/week @ 2024-09-25 7/week @ 2024-10-02

309 downloads per month

MIT/Apache

11KB
231 lines

unbytes

Ergonomic, performant, owned forward-only cursors based on bytes, with some bonus features.

unbytes gives the following guarantees:

  • Never panics.
  • Never copies.
  • Never allocates.

Note that implementations involving the bytes crate can allocate. Traits like Into<Bytes>, especially on Vecs, are very likely to reallocate. unbytes can't do anything about that.

The following feature flags are available, but none are enabled by default.

  • std: Standard library support, like an std::io::Read implementation.
  • maypanic: Functionality that may panic if used improperly, like a Buf implementation.

Dependencies

~175KB