Skip to main content

Crate bytestringmut

Crate bytestringmut 

Source
Expand description

Mutable manipulation of ByteStrings for creating UTF-8 strings that can be cheaply cloned and shared across threads without allocating memory.

Internally, a ByteStringMut is a wrapper around a BytesMut buffer from the bytes crate. It offers most of the same functionality, except it prevents the underlying data from becoming invalid UTF-8. Due to this, it can safely be used to construct strings, as well as dereferenced as a &str or &mut str.

Structsยง

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