Module buf

Source
Expand description

Utilities for working with buffers.

io_uring 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 io_uring contract.

Structs§

IoVecWrapper
A wrapper to make IoVecBuf impl IoBuf.
IoVecWrapperMut
A wrapper to make IoVecBufMut impl IoBufMut.
MsgMeta
RawBuf
RawBuf is not a real buf. It only hold the pointer of the buffer. Users must make sure the buffer behind the pointer is always valid. Which means, user must:
RawBufVectored
RawBufVectored behaves like RawBuf. And user must obey the following restrictions:
Slice
An owned view into a contiguous sequence of bytes. Slice implements IoBuf.
SliceMut
An owned view into a contiguous sequence of bytes. SliceMut implements IoBuf and IoBufMut.
VecBuf
A intermediate struct that impl IoVecBuf and IoVecBufMut.

Traits§

IoBuf
An io_uring compatible buffer.
IoBufMut
A mutable io_uring compatible buffer.
IoVecBuf
An io_uring compatible iovec buffer.
IoVecBufMut
A mutable io_uring compatible iovec buffer.
MsgBuf
An io_uring compatible msg buffer.
MsgBufMut
An io_uring compatible msg buffer.