Internally, the struct will store the following based on crate features:
std::io::IoSlicedirectly, with accessors for it as well as conversion functions and From impls.
#[cfg(unix)]) - wrapping
libc::iovecdirectly on platforms that support it. A marker is also stored, to safely wrap the raw pointer, and forcing usage of this API to follow the borrow checker rules.
- (none) - wrapping a regular slice, that may not have the same ABI guarantees as the types from std or libc have.
IoSlice will however implement
Deref<Target = [u8]>
regardless of the features used, so long as the slice is marked as initialized.
An error that may occur if allocating an I/O box fails.
An owned chunk of memory, that is ABI-compatible with