Module buf

Source
Expand description

Utilities for working with buffers.

A buffer is any structure that contains a sequence of bytes. The bytes may or may not be stored in contiguous memory. This module contains traits used to abstract over buffers as well as utilities for working with buffer types.

ยงBuf, BufMut

These are the two foundational traits for abstractly working with buffers. They can be thought as iterators for byte structures. They offer additional performance over Iterator by providing an API optimized for byte slices.

See Buf and BufMut for more details.

Modulesยง

buf_impl ๐Ÿ”’
buf_mut ๐Ÿ”’
chain ๐Ÿ”’
iter ๐Ÿ”’
limit ๐Ÿ”’
reader ๐Ÿ”’
take ๐Ÿ”’
uninit_slice ๐Ÿ”’
vec_deque ๐Ÿ”’
writer ๐Ÿ”’

Structsยง

Chain
A Chain sequences two buffers.
IntoIter
Iterator over the bytes contained by the buffer.
Limit
A BufMut adapter which limits the amount of bytes that can be written to an underlying buffer.
Reader
A Buf adapter which implements io::Read for the inner value.
Take
A Buf adapter which limits the bytes read from an underlying buffer.
UninitSlice
Uninitialized byte slice.
Writer
A BufMut adapter which implements io::Write for the inner value.

Traitsยง

Buf
Read bytes from a buffer.
BufMut
A trait for values that provide sequential write access to bytes.