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 SgData
pub 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) -> usize
Returns 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) -> bool
Checks 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) -> Self
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 unsafe fn clone_masked(&self, mask: Range<usize>) -> Self
[src]
pub unsafe fn clone_masked(&self, mask: Range<usize>) -> Self
Applies 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) -> bool
Checks whether this instance is built from Element
pub fn is_sglist(&self) -> bool
[src]
pub fn is_sglist(&self) -> bool
Checks whether this instance is built from SgList
pub fn as_sglist(&self) -> &SgList
[src]
pub fn as_sglist(&self) -> &SgList
If this object is built from SgList
exposes the underlying SgList
object.
pub fn to_sglist(&self) -> SgList
[src]
pub fn to_sglist(&self) -> SgList
If this object is built from SgList
clones the underlying SgList
object.
Trait Implementations
impl Debug for SgData
[src]
impl Debug for SgData
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for SgData
[src]
impl PartialEq for SgData
fn eq(&self, other: &SgData) -> bool
[src]
fn eq(&self, other: &SgData) -> bool
This 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) -> bool
This method tests for !=
.
impl From<SgList> for SgData
[src]
impl From<SgList> for SgData
impl From<Vec<u8>> for SgData
[src]
impl From<Vec<u8>> for SgData
impl From<Vec<Vec<u8>>> for SgData
[src]
impl From<Vec<Vec<u8>>> for SgData
impl From<Element> for SgData
[src]
impl From<Element> for SgData
impl From<Vec<Element>> for SgData
[src]
impl From<Vec<Element>> for SgData
impl From<SgData> for Vec<u8>
[src]
impl From<SgData> for Vec<u8>
impl FromIterator<u8> for SgData
[src]
impl FromIterator<u8> for SgData
fn 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 SgData
fn 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 SgData
fn 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 SgData
type 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::IntoIter
Creates an iterator from a value. Read more
impl Extend<u8> for SgData
[src]
impl Extend<u8> for SgData
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>,
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 SgData
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]>,
Extends a collection with the contents of an iterator. Read more
impl Extend<Element> for SgData
[src]
impl Extend<Element> for SgData
fn 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 SgData
fn 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 SgData
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
fn add(self, rhs: Self) -> Self::Output
Performs the +
operation.
impl AddAssign for SgData
[src]
impl AddAssign for SgData
fn 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 SgData
fn 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