tree: 671f8076a9bf9a25f0d7cb40b2520248a2f63462 [path history] [tgz]
  1. benches/
  2. ci/
  3. patches/
  4. src/
  5. tests/
  6. .cargo-checksum.json
  7. Android.bp
  8. Cargo.toml
  9. cargo_embargo.json
  10. CHANGELOG.md
  11. clippy.toml
  12. LICENSE
  13. METADATA
  14. MODULE_LICENSE_MIT
  15. README.md
  16. TEST_MAPPING
crates/bytes/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.