Enum rexsgdata::SgData[][src]

pub enum SgData {
    SgList(SgList),
    SgVec(Vec<Vec<u8>>),
    Direct(Vec<u8>),
    Element(Vec<Element>),
}

High Level wrapper for multiple data representation methods.

Variants

Classic Scatter Gather list as it comes from C (array of iovec elements)

Vec scatter-gather list

Plain Vec buffer

Special case for iovec array that is itself a Rust' Vec

Methods

impl SgData
[src]

Iterates over all the underlying byte slices of this SgData.

Returns number of elements in the underlying object, NOT the total number of bytes.

Checks this SgData for containing any byte slice

Deprecated since 0.2.0

: use drain_into() instead

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.

Applies the mask to the current object and creates a new SgData object which describes only masked region

Deprecated since 0.2.2

: use Extend::extend() instead

Checks whether this instance is built from Element

Checks whether this instance is built from SgList

If this object is built from SgList exposes the underlying SgList object.

If this object is built from SgList clones the underlying SgList object.

Trait Implementations

impl Debug for SgData
[src]

Formats the value using the given formatter. Read more

impl PartialEq for SgData
[src]

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

This method tests for !=.

impl From<SgList> for SgData
[src]

Performs the conversion.

impl From<Vec<u8>> for SgData
[src]

Performs the conversion.

impl From<Vec<Vec<u8>>> for SgData
[src]

Performs the conversion.

impl From<Element> for SgData
[src]

Performs the conversion.

impl From<Vec<Element>> for SgData
[src]

Performs the conversion.

impl From<SgData> for Vec<u8>
[src]

Performs the conversion.

impl FromIterator<u8> for SgData
[src]

Creates a value from an iterator. Read more

impl FromIterator<Vec<u8>> for SgData
[src]

Creates a value from an iterator. Read more

impl FromIterator<Element> for SgData
[src]

Creates a value from an iterator. Read more

impl IntoIterator for SgData
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl Extend<u8> for SgData
[src]

Extends a collection with the contents of an iterator. Read more

impl<'a> Extend<&'a [u8]> for SgData
[src]

Extends a collection with the contents of an iterator. Read more

impl Extend<Element> for SgData
[src]

Extends a collection with the contents of an iterator. Read more

impl<'a> Extend<&'a Element> for SgData
[src]

Extends a collection with the contents of an iterator. Read more

impl Add for SgData
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl AddAssign for SgData
[src]

Performs the += operation.

impl Serialize for SgData
[src]

Serialize this value into the given Serde serializer. Read more

impl Value for SgData
[src]

Serialize self into Serializer Read more

Auto Trait Implementations

impl Send for SgData

impl Sync for SgData