Build an iovec suitable for a read into `buf`.
(buf: &mut [u8])
| 83 | |
| 84 | /// Build an iovec suitable for a read into `buf`. |
| 85 | pub fn read_iovec(buf: &mut [u8]) -> libc::iovec { |
| 86 | libc::iovec { |
| 87 | iov_base: buf.as_mut_ptr().cast(), |
| 88 | iov_len: buf.len(), |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | /// Build an iovec suitable for a write from `buf`. |
| 93 | pub fn write_iovec(buf: &[u8]) -> libc::iovec { |
no test coverage detected