commit | 86af907457a91607f8480e81dd6d51eeb8da5f52 | [log] [tgz] |
---|---|---|
author | Martin Geisler <[email protected]> | Wed Feb 08 19:14:58 2023 +0100 |
committer | Cherrypicker Worker <[email protected]> | Thu Mar 16 17:27:04 2023 +0000 |
tree | 3a569cb7639bb0a58d73b6613c9054c382801a59 | |
parent | 93e2e9787ff376ef44812969f84c2b9137067c57 [diff] |
bytes: enable “serde” Cargo feature This allows us to serialize and deserialize a Bytes value via Serde. I’ll be using this for auto-generated PDL tests at first. This simply allows more code to compile: existing code is unaffected. Test: presubmit (cherry picked from https://android-review.googlesource.com/q/commit:5309249612fab0f62ebb1ec133ac7ba796d8b5e3) Merged-In: I4709fb521feef7ffa519a47a32c80c290974f219 Change-Id: I4709fb521feef7ffa519a47a32c80c290974f219
A utility library for working with bytes.
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 is optional and disabled by default. To enable use the feature serde
.
[dependencies] bytes = { version = "1", features = ["serde"] }
This project is licensed under the MIT license.
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.