Struct rexsgdata::SgData [−][src]
pub struct SgData { /* fields omitted */ }
Expand description
High Level scatter gather list wrapper for multiple data representation methods.
Safety: When creating SgData from Iovec / SgList, it is assumed that these
strustures live longer than the created SgData lifetime.
This is the user responsibility taking care of
allocating/deallocating Iovec / SgList memory.
Implementations
impl SgData
[src]
impl SgData
[src]pub unsafe fn drain_into(self, iovec: *mut iovec, count: usize) -> Self
[src]
pub unsafe fn drain_into(self, iovec: *mut iovec, count: usize) -> Self
[src]Moves the data contained in this SgData
instance into iovec
.
Consumes this instance and creates a new one, based on the buffers
described by iovec
and count
.
pub fn clone_masked(&self, mask: Range<usize>) -> Self
[src]
pub fn clone_masked(&self, mask: Range<usize>) -> Self
[src]Applies the mask
to the current object and creates a new SgData
object which describes
only masked region
pub unsafe fn from_sglist(sglist: SgList) -> Self
[src]
pub fn iter(&self) -> impl Iterator<Item = &[u8]>
[src]
pub fn iter(&self) -> impl Iterator<Item = &[u8]>
[src]Iterates over all the underlying byte slices of this SgData
.
pub fn size(&self) -> usize
[src]
pub fn size(&self) -> usize
[src]Returns number of elements in the underlying object, NOT the total number of bytes.
pub fn with_capacity(capacity: usize) -> Self
[src]
pub fn with_capacity(capacity: usize) -> Self
[src]Create an SgData
with specified capacity
Trait Implementations
impl AddAssign<SgData> for SgData
[src]
impl AddAssign<SgData> for SgData
[src]fn add_assign(&mut self, rhs: Self)
[src]
fn add_assign(&mut self, rhs: Self)
[src]Performs the +=
operation. Read more
impl<'de> Deserialize<'de> for SgData
[src]
impl<'de> Deserialize<'de> for SgData
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[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<'a> Extend<&'a [u8]> for SgData
[src]
impl<'a> Extend<&'a [u8]> for SgData
[src]fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = &'a [u8]>,
[src]
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = &'a [u8]>,
[src]Extends a collection with the contents of an iterator. Read more
fn extend_one(&mut self, item: A)
[src]
fn extend_one(&mut self, item: A)
[src]extend_one
)Extends a collection with exactly one element.
fn extend_reserve(&mut self, additional: usize)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl Extend<SgData> for SgData
[src]
impl Extend<SgData> for SgData
[src]fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = Self>,
[src]
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = Self>,
[src]Extends a collection with the contents of an iterator. Read more
fn extend_one(&mut self, item: A)
[src]
fn extend_one(&mut self, item: A)
[src]extend_one
)Extends a collection with exactly one element.
fn extend_reserve(&mut self, additional: usize)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl Extend<u8> for SgData
[src]
impl Extend<u8> for SgData
[src]fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = u8>,
[src]
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = u8>,
[src]Extends a collection with the contents of an iterator. Read more
fn extend_one(&mut self, item: A)
[src]
fn extend_one(&mut self, item: A)
[src]extend_one
)Extends a collection with exactly one element.
fn extend_reserve(&mut self, additional: usize)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl<I: Into<Self>> FromIterator<I> for SgData
[src]
impl<I: Into<Self>> FromIterator<I> for SgData
[src]fn from_iter<U>(iter: U) -> Self where
U: IntoIterator<Item = I>,
[src]
fn from_iter<U>(iter: U) -> Self where
U: IntoIterator<Item = I>,
[src]Creates a value from an iterator. Read more
impl FromIterator<u8> for SgData
[src]
impl FromIterator<u8> for SgData
[src]fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = u8>,
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = u8>,
[src]Creates a value from an iterator. Read more
Auto Trait Implementations
impl RefUnwindSafe for SgData
impl Send for SgData
impl Sync for SgData
impl Unpin for SgData
impl UnwindSafe for SgData
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
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]
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,