strchunk/
lib.rs

1//! UTF-8 string invariants for byte buffers provided by the `bytes` crate.
2//!
3//! The `strchunk` crate builds on the efficient byte containers provided
4//! by the `bytes` crate. Its two container types, `StrChunk` and `StrChunkMut`,
5//! wrap around `Bytes` and `BytesMut`, respectively, adding a guarantee
6//! for the content to be valid UTF-8 to make it safely usable as
7//! Rust string slices.
8
9#![cfg_attr(feature = "specialization", feature(min_specialization))]
10#![warn(rust_2018_idioms)]
11#![warn(missing_docs)]
12#![warn(clippy::all)]
13
14mod chunk;
15mod chunk_mut;
16mod impls;
17
18pub use crate::chunk::{ExtractUtf8Error, StrChunk};
19pub use crate::chunk_mut::StrChunkMut;