• Home
Name Date Size #Lines LOC

..--

.github/workflows/06-Sep-2024-173137

benches/06-Sep-2024-575497

ci/06-Sep-2024-5526

patches/06-Sep-2024-1311

src/06-Sep-2024-7,4763,077

tests/06-Sep-2024-2,1731,603

.cargo_vcs_info.jsonD06-Sep-202494 66

.gitignoreD06-Sep-202420 32

Android.bpD06-Sep-20246.6 KiB320305

CHANGELOG.mdD06-Sep-20247.8 KiB295200

Cargo.tomlD06-Sep-20241.2 KiB5548

Cargo.toml.origD06-Sep-2024788 3528

LICENSED06-Sep-20241 KiB2622

METADATAD06-Sep-2024593 2119

MODULE_LICENSE_MITD06-Sep-20240

NOTICED06-Sep-20241 KiB2622

OWNERSD06-Sep-202440 21

README.mdD06-Sep-20241.2 KiB5737

TEST_MAPPINGD06-Sep-20242.1 KiB109108

cargo_embargo.jsonD06-Sep-2024186 1312

clippy.tomlD06-Sep-202414 21

README.md

1# Bytes
2
3A utility library for working with bytes.
4
5[![Crates.io][crates-badge]][crates-url]
6[![Build Status][ci-badge]][ci-url]
7
8[crates-badge]: https://img.shields.io/crates/v/bytes.svg
9[crates-url]: https://crates.io/crates/bytes
10[ci-badge]: https://github.com/tokio-rs/bytes/workflows/CI/badge.svg
11[ci-url]: https://github.com/tokio-rs/bytes/actions
12
13[Documentation](https://docs.rs/bytes)
14
15## Usage
16
17To use `bytes`, first add this to your `Cargo.toml`:
18
19```toml
20[dependencies]
21bytes = "1"
22```
23
24Next, add this to your crate:
25
26```rust
27use bytes::{Bytes, BytesMut, Buf, BufMut};
28```
29
30## Serde support
31
32Serde support is optional and disabled by default. To enable use the feature `serde`.
33
34```toml
35[dependencies]
36bytes = { version = "1", features = ["serde"] }
37```
38
39## Building documentation
40
41When building the `bytes` documentation the `docsrs` option should be used, otherwise
42feature gates will not be shown. This requires a nightly toolchain:
43
44```
45RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc
46```
47
48## License
49
50This project is licensed under the [MIT license](LICENSE).
51
52### Contribution
53
54Unless you explicitly state otherwise, any contribution intentionally submitted
55for inclusion in `bytes` by you, shall be licensed as MIT, without any additional
56terms or conditions.
57