Skip to main content

Crate buf

Crate buf 

Expand description

Buffer utilities for completion-based IO.

Completion APIs require passing ownership of buffers to the runtime. The crate defines IoBuf and IoBufMut traits which are implemented by buffer types that respect the safety contract.

Modules§

arrayvec
arrayvec provides the types ArrayVec and ArrayString: array-backed vector and string types, which store their contents inline.
bumpalo
bumpalo
bytes
Provides abstractions for working with bytes.
memmap2
A cross-platform Rust API for memory mapped buffers.

Macros§

buf_try
A helper macro to imitate the behavior of try trait ?.

Structs§

BufResult
A specialized Result type for operations with buffers.
Reader
Adapts an IoBuf to implement the std::io::Read trait.
ReaderRef
Adapts a reference to IoBuf to std::io::Read trait.
Slice
An owned view into a contiguous sequence of bytes.
Uninit
A Slice that only exposes uninitialized bytes.
VectoredBufIter
An owned iterator over a vectored buffer.
VectoredSlice
Return type for IoVectoredBuf::slice and IoVectoredBufMut::slice_mut.
Writer
Adapts an IoBufMut to implement the std::io::Write trait.
WriterRef
Adapts a mutable reference to IoBufMut to std::io::Write trait.

Enums§

ReserveError
An error indicating that reserving capacity for a buffer failed.
ReserveExactError
An error indicating that reserving exact capacity for a buffer failed.

Traits§

IntoInner
Trait to get the inner buffer of an operation or a result.
IoBuf
A trait for immutable buffers.
IoBufMut
A trait for mutable buffers.
IoVectoredBuf
A trait for vectored buffers.
IoVectoredBufMut
A trait for mutable vectored buffers.
SetLen
A helper trait for set_len like methods.