Enum rexsgdata::SgData [−][src]
High Level wrapper for multiple data representation methods.
Variants
SgList(SgList)Classic Scatter Gather list as it comes from C (array of iovec elements)
SgVec(Vec<Vec<u8>>)Vec
Direct(Vec<u8>)Plain Vec
Element(Vec<Element>)Special case for iovec array that is itself a Rust' Vec
Methods
impl SgData[src]
impl SgDatapub fn iter(
&self
) -> impl Iterator<Item = &[u8]>[src]
pub fn iter(
&self
) -> impl Iterator<Item = &[u8]>Iterates over all the underlying byte slices of this SgData.
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeReturns number of elements in the underlying object, NOT the total number of bytes.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolChecks this SgData for containing any byte slice
pub unsafe fn clone_into(self, iovec: *mut iovec, count: c_int) -> Self[src]
pub unsafe fn clone_into(self, iovec: *mut iovec, count: c_int) -> Self: use drain_into() instead
pub unsafe fn drain_into(self, iovec: *const iovec, count: usize) -> Self[src]
pub unsafe fn drain_into(self, iovec: *const iovec, count: usize) -> SelfMoves 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 unsafe fn clone_masked(&self, mask: Range<usize>) -> Self[src]
pub unsafe fn clone_masked(&self, mask: Range<usize>) -> SelfApplies the mask to the current object and creates a new SgData object which describes
only masked region
pub fn append(&mut self, other: &mut Self)[src]
pub fn append(&mut self, other: &mut Self): use Extend::extend() instead
pub fn is_element(&self) -> bool[src]
pub fn is_element(&self) -> boolChecks whether this instance is built from Element
pub fn is_sglist(&self) -> bool[src]
pub fn is_sglist(&self) -> boolChecks whether this instance is built from SgList
pub fn as_sglist(&self) -> &SgList[src]
pub fn as_sglist(&self) -> &SgListIf this object is built from SgList exposes the underlying SgList object.
pub fn to_sglist(&self) -> SgList[src]
pub fn to_sglist(&self) -> SgListIf this object is built from SgList clones the underlying SgList object.
pub fn zero(size: usize) -> Self[src]
pub fn zero(size: usize) -> SelfCreates an efficient (ZLE) zeroed buffer
Trait Implementations
impl Debug for SgData[src]
impl Debug for SgDatafn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for SgData[src]
impl PartialEq for SgDatafn eq(&self, other: &SgData) -> bool[src]
fn eq(&self, other: &SgData) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &SgData) -> bool[src]
fn ne(&self, other: &SgData) -> boolThis method tests for !=.
impl From<SgList> for SgData[src]
impl From<SgList> for SgDataimpl From<Vec<u8>> for SgData[src]
impl From<Vec<u8>> for SgDataimpl From<Vec<Vec<u8>>> for SgData[src]
impl From<Vec<Vec<u8>>> for SgDataimpl From<Element> for SgData[src]
impl From<Element> for SgDataimpl From<Vec<Element>> for SgData[src]
impl From<Vec<Element>> for SgDataimpl From<SgData> for Vec<u8>[src]
impl From<SgData> for Vec<u8>impl FromIterator<u8> for SgData[src]
impl FromIterator<u8> for SgDatafn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = u8>, [src]
fn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = u8>, Creates a value from an iterator. Read more
impl FromIterator<Vec<u8>> for SgData[src]
impl FromIterator<Vec<u8>> for SgDatafn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = Vec<u8>>, [src]
fn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = Vec<u8>>, Creates a value from an iterator. Read more
impl FromIterator<Element> for SgData[src]
impl FromIterator<Element> for SgDatafn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = Element>, [src]
fn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = Element>, Creates a value from an iterator. Read more
impl IntoIterator for SgData[src]
impl IntoIterator for SgDatatype Item = Vec<u8>
The type of the elements being iterated over.
type IntoIter = IntoIter<Self::Item>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
fn into_iter(self) -> Self::IntoIterCreates an iterator from a value. Read more
impl Extend<u8> for SgData[src]
impl Extend<u8> for SgDatafn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = u8>, [src]
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = u8>, Extends a collection with the contents of an iterator. Read more
impl<'a> Extend<&'a [u8]> for SgData[src]
impl<'a> Extend<&'a [u8]> for SgDatafn 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]>, Extends a collection with the contents of an iterator. Read more
impl Extend<Element> for SgData[src]
impl Extend<Element> for SgDatafn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = Element>, [src]
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = Element>, Extends a collection with the contents of an iterator. Read more
impl<'a> Extend<&'a Element> for SgData[src]
impl<'a> Extend<&'a Element> for SgDatafn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = &'a Element>, [src]
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = &'a Element>, Extends a collection with the contents of an iterator. Read more
impl Add for SgData[src]
impl Add for SgDatatype Output = Self
The resulting type after applying the + operator.
fn add(self, rhs: Self) -> Self::Output[src]
fn add(self, rhs: Self) -> Self::OutputPerforms the + operation.
impl AddAssign for SgData[src]
impl AddAssign for SgDatafn add_assign(&mut self, rhs: Self)[src]
fn add_assign(&mut self, rhs: Self)Performs the += operation.
impl Serialize for SgData[src]
impl Serialize for SgDatafn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer, [src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer, Serialize this value into the given Serde serializer. Read more
impl Value for SgData[src]
impl Value for SgData