[][src]Struct rexsgdata::SgList

pub struct SgList { /* fields omitted */ }

Wrapper for a C-style scatter gather list

Methods

impl SgList[src]

pub fn new(iovec: *const iovec, count: usize) -> Self[src]

Constructs new SgList object from raw arguments

pub fn into_inner(self) -> (*const iovec, usize)[src]

Deconstructs the SgList object into original building blocks.

pub unsafe fn index_unchecked(&self, idx: isize) -> &iovec[src]

Returns a reference to a idx' element of this Scatter Gather List

pub unsafe fn iter(&self) -> impl Iterator<Item = &iovec>[src]

Iterates over &iovec stored in this SgList

pub unsafe fn iter_slices(&self) -> impl Iterator<Item = &[u8]>[src]

Iterates over byte slices &u8

pub unsafe fn iter_slices_mut(&self) -> impl Iterator<Item = &mut [u8]>[src]

Iterates over byte slices &u8

pub unsafe fn iter_range(&self) -> impl Iterator<Item = (&iovec, Range<usize>)>[src]

Iterates over tuples of &iovec and associated Range describing this iovec position in the whole SgList

pub unsafe fn iter_slices_range(
    &self
) -> impl Iterator<Item = (&[u8], Range<usize>)>
[src]

Iterates over tuples of &[u8] slices and associated Range describing this slice position in the whole SgList

pub unsafe fn iter_slices_range_mut(
    &self
) -> impl Iterator<Item = (&mut [u8], Range<usize>)>
[src]

Iterates over tuples of &mut [u8] slices and associated Range describing this slice position in the whole SgList.

pub unsafe fn iter_masked<'a>(
    &'a self,
    mask: Range<usize>
) -> impl Iterator<Item = iovec> + 'a
[src]

Given a mask iterates over iovec that a visible after masking

pub fn size(&self) -> usize[src]

Returns number of elements in the underlying object, NOT the total number of bytes.

pub fn is_empty(&self) -> bool[src]

Does this sg list has any element?

pub unsafe fn capacity(&self) -> usize[src]

Calculates the total amount of bytes in this SgList

Trait Implementations

impl PartialEq<SgList> for SgList[src]

impl Sync for SgList[src]

impl Clone for SgList[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Send for SgList[src]

impl<O> From<SgList> for SgData<O> where
    O: Clone
[src]

impl Debug for SgList[src]

impl Serialize for SgList[src]

impl<'de> Deserialize<'de> for SgList[src]

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]