| 1 | #![doc(test(attr(deny(warnings))))] |
| 2 | #![warn(missing_docs)] |
| 3 | #![cfg_attr(all(not(test), not(feature = "std")), no_std)] |
| 4 | |
| 5 | //! # Extra utilities for the [bytes] crate. |
| 6 | //! |
| 7 | //! The [bytes] crate defines few traits and types to help with high-performance manipulation of |
| 8 | //! byte arrays. Nevertheless, it is more of an interface-level of library (many other crates |
| 9 | //! expose its types and traits in their own public interfaces) and therefore tries to be on the |
| 10 | //! lean side. |
| 11 | //! |
| 12 | //! One often wishes for some more auxiliary functionality „around“ these types and that's what |
| 13 | //! this crate aims to provide. |
| 14 | //! |
| 15 | //! ## The content |
| 16 | //! |
| 17 | //! * [SegmentedBuf] and [SegmentedSlice] for concatenating multiple buffers into a large one |
| 18 | //! without copying the bytes. |
| 19 | //! * [Str] and [StrMut] are wrappers around [Bytes][bytes::Bytes] and [BytesMut] |
| 20 | //! respectively, providing a [String]-like interface. They allow splitting into owned |
| 21 | //! sub-slices, similar to how the [Bytes] and [BytesMut] work. |
| 22 | //! |
| 23 | //! [Bytes]: bytes::Bytes |
| 24 | //! [BytesMut]: bytes::BytesMut |
| 25 | |
| 26 | extern crate allocrust-analyzer cargo bytes-utils 0.1.4 alloc/; |
| 27 | |
| 28 | mod segmentedrust-analyzer cargo bytes-utils 0.1.4 segmented/; |
| 29 | pub mod stringrust-analyzer cargo bytes-utils 0.1.4 string/; |
| 30 | |
| 31 | pub use segmentedrust-analyzer cargo bytes-utils 0.1.4 segmented/::{SegmentedBufrust-analyzer cargo bytes-utils 0.1.4 segmented/SegmentedBuf#, SegmentedSlicerust-analyzer cargo bytes-utils 0.1.4 segmented/SegmentedSlice#}; |
| 32 | pub use stringrust-analyzer cargo bytes-utils 0.1.4 string/::{Strrust-analyzer cargo bytes-utils 0.1.4 string/Str#, StrMutrust-analyzer cargo bytes-utils 0.1.4 string/StrMut#}; |