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