1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

//! # minibytes
//!
//! This create provides the [`Bytes`] type. It is similar to `&[u8]`: cloning
//! or slicing are zero-copy. Unlike `&[u8]`, `Bytes` does not have lifetime.
//! This is done by maintaining the life cycle of the underlying storage using
//! reference count.
//!
//! Aside from supporting `Vec<u8>` as the underlying storage, [`Bytes`] also
//! supports [`memmap::Mmap`]. Libraries can implement [`BytesOwner`] for other
//! types to further extend storage support.

mod bytes;
mod impls;
mod owners;
mod serde;
mod text;

#[cfg(test)]
mod tests;

pub use text::Text;
pub use text::TextOwner;

pub use crate::bytes::Bytes;
pub use crate::bytes::BytesOwner;