Skip to main content

Crate bytestringmut

Crate bytestringmut 

Source
Expand description

A pool for creating byte-slices and strings that can be cheaply cloned and shared across threads without allocating memory. Byte-slices are shared as Bytes, and strings are shared as ByteStrings.

Internally, a BytesPool is a wrapper around a ByteStringMut buffer from the bytes crate. It shares data by appending the data to its buffer and then splitting the buffer off with ByteStringMut::split. This only allocates memory if the buffer needs to resize.

Structsยง

ByteString
An immutable UTF-8 encoded string using Bytes as the storage.
ByteStringMut
Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.