IntermediateBufferArrayMut

Struct IntermediateBufferArrayMut 

Source
pub struct IntermediateBufferArrayMut<'a, const N: usize> {
    pub array: [Option<&'a mut IntermediateBuffer>; N],
    pub initialized_count: usize,
}
Expand description

IntermediateBufferArrayMut is a struct that holds an array of mutable references to IntermediateBuffer objects. It also keeps track of the number of initialized elements in the array.

Fields§

§array: [Option<&'a mut IntermediateBuffer>; N]§initialized_count: usize

Implementations§

Source§

impl<'a, const N: usize> IntermediateBufferArrayMut<'a, N>

Source

pub fn new(iter: impl Iterator<Item = &'a mut IntermediateBuffer>) -> Self

Constructs a new IntermediateBufferArrayMut from an iterator over mutable references to IntermediateBuffer objects. The iterator is consumed up to N items and the number of initialized elements is tracked.

Source

pub fn get_packet_number(&self) -> usize

Returns the number of initialized elements in the array.

Trait Implementations§

Source§

impl<'a, const N: usize> Default for IntermediateBufferArrayMut<'a, N>

Provides a default value for IntermediateBufferArrayMut. The default value is an array of None with a size of N and an initialized count of 0.

Source§

fn default() -> Self

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

impl<'a, const N: usize> Extend<&'a mut IntermediateBuffer> for IntermediateBufferArrayMut<'a, N>

Extends the IntermediateBufferArrayMut with an iterator over mutable references to IntermediateBuffer objects. The iterator is consumed up to N items and the number of initialized elements is tracked.

Source§

fn extend<T: IntoIterator<Item = &'a mut IntermediateBuffer>>( &mut self, iter: T, )

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

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<'a, const N: usize> From<IntermediateBufferArrayMut<'a, N>> for [Option<&'a mut IntermediateBuffer>; N]

Converts the IntermediateBufferArrayMut into an array of mutable references to IntermediateBuffer objects.

Source§

fn from(val: IntermediateBufferArrayMut<'a, N>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a, const N: usize> Freeze for IntermediateBufferArrayMut<'a, N>

§

impl<'a, const N: usize> RefUnwindSafe for IntermediateBufferArrayMut<'a, N>

§

impl<'a, const N: usize> Send for IntermediateBufferArrayMut<'a, N>

§

impl<'a, const N: usize> Sync for IntermediateBufferArrayMut<'a, N>

§

impl<'a, const N: usize> Unpin for IntermediateBufferArrayMut<'a, N>

§

impl<'a, const N: usize> !UnwindSafe for IntermediateBufferArrayMut<'a, N>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.