[−][src]Struct rexsgdata::SgList
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]
&self
) -> impl Iterator<Item = (&[u8], Range<usize>)>
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]
&self
) -> impl Iterator<Item = (&mut [u8], Range<usize>)>
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]
&'a self,
mask: Range<usize>
) -> impl Iterator<Item = iovec> + 'a
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 Sync for SgList[src]
impl Send for SgList[src]
impl PartialEq<SgList> for SgList[src]
impl Clone for SgList[src]
fn clone(&self) -> SgList[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<O> From<SgList> for SgData<O> where
O: Clone, [src]
O: Clone,
impl Debug for SgList[src]
impl Serialize for SgList[src]
impl<'de> Deserialize<'de> for SgList[src]
fn deserialize<D>(_deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]
D: Deserializer<'de>,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized, [src]
T: Send + Sync + UnwindSafe + ?Sized,