bytes
bytes copied to clipboard
Utilities for working with bytes
The `BufMut::remaining_mut` implementation for `BytesMut` does `usize::MAX - self.len()`, while the `Vec` impl does `isize::MAX as usize - self.len()` instead. Shouldn't they both use `isize::MAX` given than `BytesMut` is represented...
The current documentation for `BufMut::advance_mut` suggests that the implementation should handle cases where `cnt > self.remaining_mut()`. However, since this function is already unsafe and requires the caller to ensure that...
bytes v1 currently has two feature flags: `std` and `serde`, the former of which is enabled by default. bytes v2 is projected have these flags plus an additional flag for...
This PR is identical diff-wise to #513 with some additional justification that hopefully leads to a merge. There are currently two open discussions. One is on whether the `Bytes` type...
During a dependency review we noticed that the bytes crate includes various development scripts. These development scripts shouldn't be there as they might, at some point become problematic. As of...
Hi, will it be acceptable to add a `try_slice` method? Currently, having to copy the bounds check logic before invoking the `Bytes::slice`.
This implements fallible allocations by adding the `BytesMut::try_reserve()` API and implementing it on top of `Vec::try_reserve`. This uses a different implementation strategy to #613 (#521 originally), which I believe to...
This crate does not make use of serde derive macros, thus it can depend on `serde_core` instead of `serde` to speed up users' compile times. See the documentation of [`serde_core`](https://docs.rs/serde_core)...
It would be nice if `Bytes` could be decomposed into its "raw parts" in order to reduce the size overhead of types that wish to support using `Bytes` as the...