Struct rexsgdata::SgList[][src]

pub struct SgList { /* fields omitted */ }
Expand description

Wrapper for a C-style scatter gather list

Implementations

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_ref_unchecked(&self, idx: isize) -> &iovec[src]

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

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

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

Iterates over &iovec stored in this SgList

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

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

Iterates over byte slices &u8

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

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(
    &self,
    mask: Range<usize>
) -> impl Iterator<Item = iovec> + '_
[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 Clone for SgList[src]

fn clone(&self) -> SgList[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Debug for SgList[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

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

fn deserialize<D>(_deserializer: D) -> Result<Self, D::Error> where
    D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl PartialEq<SgList> for SgList[src]

fn eq(&self, other: &SgList) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &SgList) -> bool[src]

This method tests for !=.

impl Serialize for SgList[src]

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl Send for SgList[src]

impl StructuralPartialEq for SgList[src]

impl Sync for SgList[src]

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

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