Files
bytes/src/buf/mod.rs
T

43 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;
2017-02-28 18:33:34 -08:00
mod chain;
2017-03-01 09:28:07 -08:00
mod iter;
2017-02-28 15:21:20 -08:00
mod take;
2019-03-06 20:46:42 +01:00
mod vec_deque;
// When std::io::Reader etc. traits are not available, skip these
#[cfg(feature = "std")]
mod reader;
#[cfg(feature = "std")]
2017-02-28 15:21:20 -08:00
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;
#[cfg(feature = "std")]
pub use self::buf_mut::IoSliceMut;
2017-02-28 18:33:34 -08:00
pub use self::chain::Chain;
pub use self::iter::IntoIter;
#[cfg(feature = "std")]
2017-02-28 15:21:20 -08:00
pub use self::reader::Reader;
pub use self::take::Take;
#[cfg(feature = "std")]
2017-02-28 15:21:20 -08:00
pub use self::writer::Writer;