bytes
bytes copied to clipboard
Wrapper types to enable optimized handling of &[u8] and Vec<u8>
Hi. This PR adds support for constant length byte arrays `[u8; N]` and adds a `ByteArray` wrapper type similar to `BytesBuf`. This would close #26. Motivations ======== Fixed sized array...
Hi, i have a message to send in the form of: ```rust type PubKey = Vec; #[derive(Serialize, Deserialize, Debug)] #[serde(tag="kind")] pub enum Envelope { Greeting { #[serde(with="serde_bytes")] id: PubKey, #[serde(with="serde_bytes")]...
Now that `const_generics` are stable, I wonder if it is possible to implement support for `[u8; N]` arrays (`serde` seems to support them)?
…or perhaps a `SmallByteBuf` wrapper?
I'm trying to make some structures serialize into bytes in a nice way. However, these types contain both optional data and maps of bytes (`Option` and `BTreeMap`). `#[serde(with = "serde_bytes")]`...
https://github.com/serde-rs/bytes/commit/f8c4812d1e81f4bb7813fa25c37b52dc3e065741 https://github.com/serde-rs/bytes/commit/f810459d2af103184767050e6181846ed9e12138 https://github.com/serde-rs/bytes/issues/3 They could coexists with ByteBuf::from and ByteBuf::into_vec if you think these functions are clearer in documentation. I never had problems with looking for From trait implementations. Now...
In our code base we use a feature to enable/disable serde functionality on our structs. Currently we cannot use this crate, as it unconditionally pulls in serde, which we're trying...
I'm relatively new to Rust so bear with me. I'm working on a project that provides a Python API to Rust code via Pyo3. In my project I'm trying to...
serde supports Arc with the 'rc' feature. Is it possible to have support for Arc>?
These traits are not intended to be implemented outside of this crate.