[][src]Struct ioslice::IoSlice

#[repr(transparent)]pub struct IoSlice<'a> { /* fields omitted */ }

A #![no_std]-friendly wrapper over the std::io::IoSliceMut.

Internally, the struct will store the following based on crate features:

  • std - wrapping std::io::IoSlice directly, with accessors for it as well as conversion functions and From impls.
  • libc (with #[cfg(unix)] - wrapping libc::iovec directly on platforms that support it, together with a marker making rustc think this stores a &'a mut [u8].
  • (none) - wrapping a regular slice, that may not have the same ABI guarantees as the types from std or libc have.

Implementations

impl<'a> IoSlice<'a>[src]

pub fn new(slice: &'a [u8]) -> Self[src]

pub fn as_slice(&self) -> &'a [u8][src]

pub unsafe fn from_raw_iovec(slice: iovec) -> Self[src]

pub fn as_raw_iovec(&self) -> iovec[src]

pub fn as_std_ioslices(slices: &'a [Self]) -> &'a [IoSlice<'a>][src]

pub fn as_std_ioslices_mut(slices: &'a mut [Self]) -> &'a mut [IoSlice<'a>][src]

pub fn as_raw_iovecs(slices: &'a [Self]) -> &'a [iovec][src]

pub unsafe fn as_raw_iovecs_mut(slices: &'a mut [Self]) -> &'a mut [iovec][src]

pub fn advance(&mut self, count: usize)[src]

#[must_use]pub fn advance_within<'b>(
    slices: &'b mut [Self],
    n: usize
) -> Option<&'b mut [Self]>
[src]

Trait Implementations

impl<'a> AsRef<[u8]> for IoSlice<'a>[src]

impl<'a> Borrow<[u8]> for IoSlice<'a>[src]

impl<'a> Clone for IoSlice<'a>[src]

impl<'a> Copy for IoSlice<'a>[src]

impl<'a> Debug for IoSlice<'a>[src]

impl<'a> Default for IoSlice<'a>[src]

impl<'a> Deref for IoSlice<'a>[src]

type Target = [u8]

The resulting type after dereferencing.

impl<'a> Eq for IoSlice<'a>[src]

impl<'a> From<&'a [u8]> for IoSlice<'a>[src]

impl<'a> From<&'a mut [u8]> for IoSlice<'a>[src]

impl<'a> From<IoSlice<'a>> for IoSlice<'a>[src]

impl<'a> From<IoSlice<'a>> for iovec[src]

impl<'a> From<IoSliceMut<'a>> for IoSlice<'a>[src]

impl<'a> Hash for IoSlice<'a>[src]

impl<'a> Ord for IoSlice<'a>[src]

impl<'a> PartialEq<[u8]> for IoSlice<'a>[src]

impl<'a> PartialEq<IoSlice<'a>> for IoSlice<'a>[src]

impl<'a, 'b> PartialEq<IoSlice<'b>> for IoSliceMut<'a>[src]

impl<'a, 'b> PartialEq<IoSliceMut<'b>> for IoSlice<'a>[src]

impl<'a> PartialOrd<[u8]> for IoSlice<'a>[src]

impl<'a> PartialOrd<IoSlice<'a>> for IoSlice<'a>[src]

impl<'a, 'b> PartialOrd<IoSlice<'b>> for IoSliceMut<'a>[src]

impl<'a, 'b> PartialOrd<IoSliceMut<'b>> for IoSlice<'a>[src]

impl<'a> Send for IoSlice<'a>[src]

impl<'a> Sync for IoSlice<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for IoSlice<'a>

impl<'a> Unpin for IoSlice<'a>

impl<'a> UnwindSafe for IoSlice<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.