Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
benches/ | 25-Apr-2025 | - | 575 | 497 | ||
ci/ | 25-Apr-2025 | - | 48 | 22 | ||
patches/ | 25-Apr-2025 | - | 21 | 18 | ||
src/ | 25-Apr-2025 | - | 8,176 | 3,525 | ||
tests/ | 25-Apr-2025 | - | 2,660 | 2,051 | ||
.cargo-checksum.json | D | 25-Apr-2025 | 3.6 KiB | 1 | 1 | |
Android.bp | D | 25-Apr-2025 | 6.9 KiB | 337 | 321 | |
CHANGELOG.md | D | 25-Apr-2025 | 10.8 KiB | 407 | 273 | |
Cargo.toml | D | 25-Apr-2025 | 2.2 KiB | 121 | 99 | |
LICENSE | D | 25-Apr-2025 | 1 KiB | 26 | 22 | |
METADATA | D | 25-Apr-2025 | 367 | 18 | 17 | |
MODULE_LICENSE_MIT | D | 25-Apr-2025 | 0 | |||
NOTICE | D | 25-Apr-2025 | 1 KiB | 26 | 22 | |
README.md | D | 25-Apr-2025 | 1.2 KiB | 57 | 37 | |
SECURITY.md | D | 25-Apr-2025 | 348 | 10 | 5 | |
TEST_MAPPING | D | 25-Apr-2025 | 2.2 KiB | 116 | 115 | |
cargo_embargo.json | D | 25-Apr-2025 | 208 | 14 | 13 | |
clippy.toml | D | 25-Apr-2025 | 14 | 2 | 1 |
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