Bug: 158619003

Clone this repo:
  1. 6c38424 Migrate 25 crates to monorepo am: b054c42101 by James Farrell · 5 months ago main master
  2. b054c42 Migrate 25 crates to monorepo by James Farrell · 5 months ago main-16k
  3. e86d70b Generate license header with cargo_embargo. am: 21f1ba29b9 by Andrew Walbran · 6 months ago
  4. 21f1ba2 Generate license header with cargo_embargo. by Andrew Walbran · 6 months ago
  5. 5e8ee5e Update Android.bp by running cargo_embargo am: 182067541f am: 81ce1c8ce3 by James Farrell · 8 months ago android15-tests-dev

Bytes

A utility library for working with bytes.

Crates.io Build Status

Documentation

Usage

To use bytes, first add this to your Cargo.toml:

[dependencies]
bytes = "1"

Next, add this to your crate:

use bytes::{Bytes, BytesMut, Buf, BufMut};

Serde support

Serde support is optional and disabled by default. To enable use the feature serde.

[dependencies]
bytes = { version = "1", features = ["serde"] }

Building documentation

When building the bytes documentation the docsrs option should be used, otherwise feature gates will not be shown. This requires a nightly toolchain:

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in bytes by you, shall be licensed as MIT, without any additional terms or conditions.