Struct rexsgdata::SgData[][src]

pub struct SgData { /* fields omitted */ }
Expand description

Implementations

impl SgData[src]

pub fn to_vec(&self) -> Vec<u8>[src]

Copies self into a Vector

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]

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]

Iterates over all the underlying byte slices of this SgData.

pub fn size(&self) -> usize[src]

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

pub fn capacity(&self) -> usize[src]

Returns the total number of bytes in the underlying object.

pub fn is_empty(&self) -> bool[src]

Checks this SgData for containing any byte slice

pub fn with_capacity(capacity: usize) -> Self[src]

Create an SgData with specified capacity

Trait Implementations

impl Add<SgData> for SgData[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: Self) -> Self::Output[src]

Performs the + operation. Read more

impl AddAssign<SgData> for SgData[src]

fn add_assign(&mut self, rhs: Self)[src]

Performs the += operation. Read more

impl Clone for SgData[src]

fn clone(&self) -> SgData[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for SgData[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for SgData[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl<'de> Deserialize<'de> for SgData[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]

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]

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

fn extend_reserve(&mut self, additional: usize)[src]

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

impl Extend<SgData> for SgData[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]

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

fn extend_reserve(&mut self, additional: usize)[src]

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

impl Extend<u8> for SgData[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]

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

fn extend_reserve(&mut self, additional: usize)[src]

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

impl From<Iovec> for SgData[src]

fn from(iov: Iovec) -> Self[src]

Performs the conversion.

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

fn from(sgvec: Vec<Vec<u8>>) -> Self[src]

Performs the conversion.

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

fn from(vec: Vec<u8>) -> Self[src]

Performs the conversion.

impl<I: Into<Self>> FromIterator<I> for SgData[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]

fn from_iter<I>(iter: I) -> Self where
    I: IntoIterator<Item = u8>, 
[src]

Creates a value from an iterator. Read more

impl PartialEq<SgData> for SgData[src]

fn eq(&self, other: &Self) -> bool[src]

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Serialize for SgData[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl Value for SgData[src]

fn serialize(
    &self,
    _record: &Record<'_>,
    key: Key,
    serializer: &mut dyn Serializer
) -> Result
[src]

Serialize self into Serializer 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> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]

🔬 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, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]