Debian Codegraph @

src/lib.rs

raw symbols SCIP
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 alloc;
27
28 mod segmented;
29 pub mod string;
30
31 pub use segmented::{SegmentedBuf, SegmentedSlice};
32 pub use string::{Str, StrMut};