Struct nix::sys::uio::IoVec

#[repr(transparent)]
pub struct IoVec<T>(_);
Documentation

A vector of buffers.

Vectored I/O methods like writev and readv use this structure for both reading and writing. Each IoVec specifies the base address and length of an area in memory.

Implementations

impl<'a> IoVec<&'a [u8]>
pub fn from_slice(buf: &'a [u8]) -> IoVec<&'a [u8]>

Create an IoVec from a Rust slice.

impl<'a> IoVec<&'a mut [u8]>
pub fn from_mut_slice(buf: &'a mut [u8]) -> IoVec<&'a mut [u8]>

Create an IoVec from a mutable Rust slice.

impl<T> IoVec<T>
pub fn as_slice(&Self) -> &[u8]

View the IoVec as a Rust slice.

Trait Implementations

impl<T: $crate::clone::Clone> Clone for IoVec<T>
fn clone(&Self) -> IoVec<T>
impl<T: $crate::marker::Copy> Copy for IoVec<T>
impl<T: $crate::fmt::Debug> Debug for IoVec<T>
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl<T: $crate::cmp::Eq> Eq for IoVec<T>
impl<T: $crate::hash::Hash> Hash for IoVec<T>
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()
impl<T: $crate::cmp::PartialEq> PartialEq<IoVec<T>> for IoVec<T>
fn eq(&Self, other: &IoVec<T>) -> bool
fn ne(&Self, other: &IoVec<T>) -> bool
impl<T> StructuralEq for IoVec<T>
impl<T> StructuralPartialEq for IoVec<T>

Auto Trait Implementations

impl<T> !Send for IoVec<T>
impl<T> !Sync for IoVec<T>
impl<T> RefUnwindSafe for IoVec<T>
where
    T: RefUnwindSafe,
impl<T> Unpin for IoVec<T>
where
    T: Unpin,
impl<T> UnwindSafe for IoVec<T>
where
    T: UnwindSafe,

Blanket Implementations

impl<T> Any for T
where
    T: 'static + ?Sized,
fn type_id(&Self) -> TypeId
impl<T> Borrow<T> for T
where
    T: ?Sized,
fn borrow(&Self) -> &T
impl<T> BorrowMut<T> for T
where
    T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T
impl<T> From<T> for T
fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for T
where
    U: From<T>,
fn into(Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl<T> ToOwned for T
where
    T: Clone,
type Owned = T
fn to_owned(&Self) -> T
fn clone_into(&Self, target: &mut T)
impl<T, U> TryFrom<U> for T
where
    U: Into<T>,
type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T
where
    U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>