Files
bytes/src/buf/mod.rs
T

42 lines
1.2 KiB
Rust
Raw Normal View History

2017-02-28 17:09:43 -08:00
//! Utilities for working with buffers.
//!
//! A buffer is any structure that contains a sequence of bytes. The bytes may
//! or may not be stored in contiguous memory. This module contains traits used
//! to abstract over buffers as well as utilities for working with buffer types.
//!
//! # `Buf`, `BufMut`
//!
//! These are the two foundational traits for abstractly working with buffers.
//! They can be thought as iterators for byte structures. They offer additional
//! performance over `Iterator` by providing an API optimized for byte slices.
//!
//! See [`Buf`] and [`BufMut`] for more details.
//!
//! [rope]: https://en.wikipedia.org/wiki/Rope_(data_structure)
//! [`Buf`]: trait.Buf.html
//! [`BufMut`]: trait.BufMut.html
2019-08-27 23:19:44 +02:00
mod buf_impl;
2017-02-28 15:21:20 -08:00
mod buf_mut;
2020-10-16 15:16:23 -07:00
mod chain;
2017-03-01 09:28:07 -08:00
mod iter;
2020-10-16 15:16:23 -07:00
mod limit;
#[cfg(feature = "std")]
mod reader;
mod take;
mod uninit_slice;
2019-03-06 20:46:42 +01:00
mod vec_deque;
2020-10-16 15:16:23 -07:00
#[cfg(feature = "std")]
mod writer;
2019-08-27 23:19:44 +02:00
pub use self::buf_impl::Buf;
2017-02-28 15:21:20 -08:00
pub use self::buf_mut::BufMut;
2020-10-16 15:16:23 -07:00
pub use self::chain::Chain;
pub use self::iter::IntoIter;
2020-10-16 15:16:23 -07:00
pub use self::limit::Limit;
pub use self::take::Take;
pub use self::uninit_slice::UninitSlice;
2020-10-16 15:16:23 -07:00
#[cfg(feature = "std")]
pub use self::{reader::Reader, writer::Writer};