3 releases (breaking)

0.3.0 Jan 27, 2023
0.2.0 Apr 2, 2020
0.1.0 Mar 13, 2020

#20 in #cloning

Download history 116/week @ 2024-11-16 117/week @ 2024-11-23 137/week @ 2024-11-30 148/week @ 2024-12-07 111/week @ 2024-12-14 56/week @ 2024-12-21 61/week @ 2024-12-28 101/week @ 2025-01-04 81/week @ 2025-01-11 75/week @ 2025-01-18 67/week @ 2025-01-25 120/week @ 2025-02-01 130/week @ 2025-02-08 111/week @ 2025-02-15 233/week @ 2025-02-22 47/week @ 2025-03-01

536 downloads per month
Used in 23 crates (4 directly)

MIT license

21KB
502 lines

minibytes

This create provides the Bytes type. It is similar to &[u8]: cloning or slicing are zero-copy. Unlike &[u8], Bytes does not have lifetime. This is done by maintaining the life cycle of the underlying storage using reference count.

Aside from supporting Vec<u8> as the underlying storage, Bytes also supports memmap::Mmap. Libraries can implement BytesOwner for other types to further extend storage support.

Dependencies

~0.3–1.1MB
~22K SLoC