[][src]Crate bytes_utils

Extra utilities for the bytes crate.

The bytes crate defines few traits and types to help with high-performance manipulation of byte arrays. Nevertheless, it is more of an interface-level of library (many other crates expose its types and traits in their own public interfaces) and therefore tries to be on the lean side.

One often wishes for some more auxiliary functionality „around“ these types and that's what this crate aims to provide.

The content

  • SegmentedBuf for concatenating multiple buffers into a large one without copying the bytes.
  • Str and StrMut are wrappers around Bytes and BytesMut respectively, providing a String-like interface. They allow splitting into owned sub-slices, similar to how the Bytes and BytesMut work.

Re-exports

pub use string::Str;
pub use string::StrMut;

Modules

string

String-like wrappers around Bytes and BytesMut.

Macros

format_bytes

The format macro, but returning Str.

format_bytes_mut

The format macro, but returning StrMut.

Structs

SegmentedBuf

A concatenation of multiple buffers into a large one, without copying the bytes over.