bytes/buf/mod.rs
1//! Utilities for working with buffers.
2//!
3//! A buffer is any structure that contains a sequence of bytes. The bytes may
4//! or may not be stored in contiguous memory. This module contains traits used
5//! to abstract over buffers as well as utilities for working with buffer types.
6//!
7//! # `Buf`, `BufMut`
8//!
9//! These are the two foundational traits for abstractly working with buffers.
10//! They can be thought as iterators for byte structures. They offer additional
11//! performance over `Iterator` by providing an API optimized for byte slices.
12//!
13//! See [`Buf`] and [`BufMut`] for more details.
14//!
15//! [rope]: https://en.wikipedia.org/wiki/Rope_(data_structure)
16
17mod buf_impl;
18mod buf_mut;
19mod chain;
20mod iter;
21mod limit;
22#[cfg(feature = "std")]
23mod reader;
24mod take;
25mod uninit_slice;
26mod vec_deque;
27#[cfg(feature = "std")]
28mod writer;
29
30pub use self::buf_impl::Buf;
31pub use self::buf_mut::BufMut;
32pub use self::chain::Chain;
33pub use self::iter::IntoIter;
34pub use self::limit::Limit;
35pub use self::take::Take;
36pub use self::uninit_slice::UninitSlice;
37
38#[cfg(feature = "std")]
39pub use self::{reader::Reader, writer::Writer};