Trait IoVecBuf

Source
pub unsafe trait IoVecBuf: Unpin + 'static {
    // Required methods
    fn read_iovec_ptr(&self) -> *const iovec;
    fn read_iovec_len(&self) -> usize;
}
Expand description

An io_uring compatible iovec buffer.

§Safety

See the safety note of the methods.

Required Methods§

Source

fn read_iovec_ptr(&self) -> *const iovec

Returns a raw pointer to iovec struct. struct iovec { void iov_base; / Starting address / size_t iov_len; / Number of bytes to transfer */ }; [iovec1][iovec2][iovec3]… ^ The pointer

§Safety

The implementation must ensure that, while the runtime owns the value, the pointer returned by stable_mut_ptr does not change. Also, the value pointed must be a valid iovec struct.

Source

fn read_iovec_len(&self) -> usize

Returns the count of iovec struct behind the pointer.

§Safety

There must be really that number of iovec here.

Implementations on Foreign Types§

Source§

impl IoVecBuf for Vec<iovec>

Implementors§