Migrate 25 crates to monorepo am: b054c42101

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/bytes/+/3219322

Change-Id: I73d3e1f4005a461cdf4cca628e4a2abaed46826d
Signed-off-by: Automerger Merge Worker <[email protected]>
tree: 28a50f69c3675f57d4bd7f866fe97da69e172005
  1. .github/
  2. benches/
  3. ci/
  4. patches/
  5. src/
  6. tests/
  7. .cargo_vcs_info.json
  8. .gitignore
  9. Android.bp
  10. Cargo.toml
  11. Cargo.toml.orig
  12. CHANGELOG.md
  13. clippy.toml
  14. LICENSE
  15. METADATA
  16. MODULE_LICENSE_MIT
  17. OWNERS
  18. README.md
README.md

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.