Find a file
2024-09-18 07:39:32 +02:00
.github/workflows ci: update nightly to nightly-2024-09-15 (#734) 2024-09-17 11:02:45 -04:00
benches test(benches): encloses bytes into test::black_box for clone benches (#691) 2024-04-11 11:45:18 +02:00
ci ci: update nightly to nightly-2024-09-15 (#734) 2024-09-17 11:02:45 -04:00
src ci: update nightly to nightly-2024-09-15 (#734) 2024-09-17 11:02:45 -04:00
tests fix: apply sign extension when decoding int (#732) 2024-08-30 08:20:29 -04:00
.gitignore Initial commit 2015-01-30 00:04:33 -08:00
Cargo.toml chore: prepare bytes v1.7.2 (#736) 2024-09-18 07:39:32 +02:00
CHANGELOG.md chore: prepare bytes v1.7.2 (#736) 2024-09-18 07:39:32 +02:00
clippy.toml Address various clippy warnings (#528) 2022-01-24 09:58:05 +01:00
LICENSE Clarify license as MIT (#216) 2018-06-18 12:49:34 -07:00
README.md Document which functions require std (#591) 2023-01-31 11:42:28 +01:00
SECURITY.md readme: add security policy (#649) 2024-01-03 17:22:39 +01:00

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.