pub unsafe trait IoVecBufMut: Unpin + 'static {
// Required methods
fn write_iovec_ptr(&mut self) -> *mut iovec;
fn write_iovec_len(&mut self) -> usize;
unsafe fn set_init(&mut self, pos: usize);
}
Expand description
Required Methods§
Sourcefn write_iovec_ptr(&mut self) -> *mut iovec
fn write_iovec_ptr(&mut self) -> *mut iovec
Returns a raw mutable 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 write_iovec_ptr
does not change.
Also, the value pointed must be a valid iovec struct.
Sourcefn write_iovec_len(&mut self) -> usize
fn write_iovec_len(&mut self) -> usize
Returns the count of iovec struct behind the pointer.