pub struct IoVec { /* fields omitted */ }A specialized byte slice type for performing vectored I/O operations.
On all systems, the types needed to perform vectored I/O systems have the
same size as Rust's slice. However, the layout is not necessarily the
same. IoVec provides a portable compatibility layer.
The IoVec behaves like a Rust slice, providing the same functions.
It also provides conversion functions to and from the OS specific vectored
types.
use iovec::IoVec;
let mut data = vec![];
data.extend_from_slice(b"hello");
let iovec: &IoVec = data.as_slice().into();
assert_eq!(&iovec[..], &b"hello"[..]);
Attempting to convert a zero-length slice or a slice longer than
MAX_LENGTH to an IoVec will result in a panic.
The resulting type after dereferencing.
Mutably dereferences the value.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static