Bytes::from_owner to enable externally-allocated memory (#742)split_off/split_to for empty slices (#740)Buf::{get_int, get_int_le} (#732)This release reverts the following change due to a regression:
<BytesMut as Buf>::advance impl (#698)The revert can be found at #726.
Bytes to BytesMut (#695, #710)BytesMut::zeroed works (#714)Buf::chunk (#717)BytesMut::truncate<BytesMut as Buf>::advance impl (#698)must_use suggestion of BytesMut::split (#699)ManuallyDrop instead of mem::forget (#678)len in BytesMut::reserve (#682)Bytes::copy_to_bytes (#688)BytesMut::truncate (#694)BytesMut::resize (#696)Bytes::split_to, Bytes::split_off (#689, #693)offset_from in more places (#705)IntoIter (#707)This release fixes a bug where Bytes::is_unique returns incorrect values when the Bytes originates from a shared BytesMut. (#718)
Bytes::is_unique (#643)UninitSlice::as_uninit_slice_mut() logic (#644)self. instead of Self:: (#642)BytesMut: Assert alignment of Shared (#652)From<Vec> (#667)sub instead of offset (#668)set_vec_pos does not need a second parameter (#672)get_vec_pos: use &self instead of &mut self (#670)split_at/split_to (#663)Iterator from the prelude (#673)copy_to_bytes: Add panic section to docs (#676)ManuallyDrop instead of mem::forget (#675)UninitSlice::{new,uninit} (#598, #599)BufMut for &mut [MaybeUninit<u8>] (#597)BytesMut::extend_from_slice as inline (#595)IntoIter constructor public (#581)BytesMut (#592)std (#591)BytesMut::spare_capacity_mut (#572)Buf and BufMut (#576)Bytes::new etc should return Self not Bytes (#568)reserve (#560)BytesMut::zeroed (#517)Extend<Bytes> for BytesMut (#527)BytesMut to Vec<u8> (#543, #554)Bytes to Vec<u8> (#547)UninitSlice::as_uninit_slice_mut() (#548)Bytes::{len,is_empty} (#514)BytesMut::reserve (#539, #544)remaining_mut() on chain (#488)BytesMut (#555)BytesMut::unsplit docs (#535)BufMut::put_bytes(self, val, cnt) (#487)From<Box<[u8]>> for Bytes (#504)put_slice for &mut [u8] (#483)Chain::remaining (#482)UninitSlice methods (#443)copy_to_bytes for Chain and Take (#481)BufMut allocation guarantees (#501)BufMut::put_int behavior (#486)clear and truncate. (#508)Vec::put_slice with #[inline] (#459)Box::into_raw instead of mem::forget-in-disguise (#458)Buf/BufMut methods bytes() and bytes_mut() to chunk() and chunk_mut() (#450)API polish in preparation for a 1.0 release.
BufMut is now an unsafe trait (#432).BufMut::bytes_mut() returns &mut UninitSlice, a type owned by bytes to avoid undefined behavior (#433).Buf::copy_to_bytes(len) replaces Buf::into_bytes() (#439).Buf/BufMut utility methods are moved onto the trait and *Ext traits are removed (#431).BufMut::bytes_vectored_mut() (#430).new methods on combinator types (#434).BytesMut to reuse buffer when fully advanced.BytesMut::{as_mut, set_len} with #[inline].Bytes.loom to dev-dependencies.serde feature in no_std environments (#385).BufMut::advance_mut to panic if advanced passed the capacity (#354)..BytesMut::freeze ignoring amount previously advanced (#352).Bytes::new a const fn.From<BytesMut> for Bytes.PartialOrd for Bytes.Bytes::truncate losing original capacity when repr is an unshared Vec.Bytes::from(Vec) when allocator gave Vec a pointer with LSB set.Bytes::slice_ref if argument is an empty slice.must_use attributes to split, split_off, and split_to methods (#337).Bytes when constructed with an empty Vec<u8> (#341, #342).Bytes::truncate with a size large than the length will no longer clear the Bytes (#333).Limit methods into_inner, get_ref, get_mut, limit, and set_limit (#325).BytesMut (#321)copy_to_sliceBytes is now a “trait object”, allowing for custom allocation strategies (#298)BytesMut implicitly grows internal storage. remaining_mut() returns usize::MAX (#316).BufMut::bytes_mut returns &mut [MaybeUninit<u8>] to reflect the unknown initialization state (#305).Buf / BufMut implementations for &[u8] and &mut [u8] respectively (#261).Buf / BufMut “extra” functions to an extension trait (#306).BufMutExt::limit (#309).Bytes::slice takes a RangeBounds argument (#265).Bytes::from_static is now a const fn (#311).no_std support (#281).get_*, put_*, get_*_le, and put_*le accessors for handling byte order.BorrowMut implementation for BytesMut (#185).IntoBuf (#288).Buf implementation for &str (#301).byteorder dependency (#280).iovec dependency, use std::IoSlice instead (#263).either dependency (#315).i128 feature -- now available on stable. (#276).FromIterator<&'a u8> for BytesMut/Bytes (#244).Buf for VecDeque (#249).BufRead for buf::Reader (#232).Buf and BufMut for Either (#225).Bytes::slice_ref (#208).IntoBuf for &mut [u8]BytesMut FromIterator implementation.Buf and BufMut usable as trait objects (#186).advance fn to Bytes/BytesMut (#166).unsplit fn to BytesMut (#162, #173).Take::bytesPartialEq implementations.Bytes::with_capacityAsMut[u8] for BytesMutextend_from_slice on Bytes and BytesMuttruncate and clear on BytesDebug implementation for Bytesbuf module and have most types available from there vs. root.IntoBuf for T: Buf.FromBuf and Buf::collect.Buf.Buf and BufMut.Buf::chain.BytesMut::reserve.Debug for more types.Source in favor of IntoBuf.Extend for BytesMut.