Function iovec::unix::as_os_slice_mut
[−]
[src]
pub fn as_os_slice_mut<'a>(iov: &'a mut [&mut IoVec]) -> &'a mut [iovec]
Convert a mutable slice of IoVec
refs to a mutable slice of libc::iovec
.
The return value can be passed to readv
bindings.
Examples
use iovec::IoVec; use iovec::unix; let mut a = [0; 10]; let mut b = [0; 10]; let bufs: &mut [&mut IoVec] = &mut [(&mut a[..]).into(), (&mut b[..]).into()]; let os_bufs = unix::as_os_slice_mut(bufs); // Use the `os_bufs` slice with `readv`.