Trait variadics::VecVariadic

source ·
pub trait VecVariadic: VariadicExt + Sealed {
    type UnVec: VariadicExt<IntoVec = Self>;
    type IntoZip: Iterator<Item = Self::UnVec>;
    type Drain<'a>: Iterator<Item = Self::UnVec>
       where Self: 'a;

    // Required methods
    fn zip_vecs(
        &self,
    ) -> impl Iterator<Item = <Self::UnVec as VariadicExt>::AsRefVar<'_>>;
    fn push(&mut self, item: Self::UnVec);
    fn get(
        &mut self,
        index: usize,
    ) -> Option<<Self::UnVec as VariadicExt>::AsRefVar<'_>>;
    fn into_zip(self) -> Self::IntoZip;
    fn drain<R>(&mut self, range: R) -> Self::Drain<'_>
       where R: RangeBounds<usize> + Clone;
}
Expand description

trait for Variadic of vecs, as formed by VariadicExt::into_vec()

Required Associated Types§

source

type UnVec: VariadicExt<IntoVec = Self>

Individual variadic items without the Vec wrapper

source

type IntoZip: Iterator<Item = Self::UnVec>

result type from into_zip

source

type Drain<'a>: Iterator<Item = Self::UnVec> where Self: 'a

result type from drain

Required Methods§

source

fn zip_vecs( &self, ) -> impl Iterator<Item = <Self::UnVec as VariadicExt>::AsRefVar<'_>>

zip across all the vecs in this VariadicVec

source

fn push(&mut self, item: Self::UnVec)

append an unvec’ed Variadic into this VariadicVec

source

fn get( &mut self, index: usize, ) -> Option<<Self::UnVec as VariadicExt>::AsRefVar<'_>>

get the unvec’ed Variadic at position index

source

fn into_zip(self) -> Self::IntoZip

Turns into an iterator of items UnVec – i.e. iterate through rows (not columns!).

source

fn drain<R>(&mut self, range: R) -> Self::Drain<'_>
where R: RangeBounds<usize> + Clone,

Turns into a Drain of items UnVec – i.e. iterate through rows (not columns!).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl VecVariadic for ()

source§

type UnVec = ()

source§

fn zip_vecs( &self, ) -> impl Iterator<Item = <Self::UnVec as VariadicExt>::AsRefVar<'_>>

source§

fn push(&mut self, _item: Self::UnVec)

source§

fn get( &mut self, _index: usize, ) -> Option<<Self::UnVec as VariadicExt>::AsRefVar<'_>>

source§

type IntoZip = Repeat<()>

source§

fn into_zip(self) -> Self::IntoZip

source§

type Drain<'a> = Repeat<()> where Self: 'a

source§

fn drain<R>(&mut self, _range: R) -> Self::Drain<'_>
where R: RangeBounds<usize>,

source§

impl<Item, Rest> VecVariadic for (Vec<Item>, Rest)
where Rest: VecVariadic,

source§

type UnVec = (Item, <Rest as VecVariadic>::UnVec)

source§

fn zip_vecs( &self, ) -> impl Iterator<Item = <Self::UnVec as VariadicExt>::AsRefVar<'_>>

source§

fn push(&mut self, row: Self::UnVec)

source§

fn get( &mut self, index: usize, ) -> Option<<Self::UnVec as VariadicExt>::AsRefVar<'_>>

source§

type IntoZip = Zip<IntoIter<Item>, <Rest as VecVariadic>::IntoZip>

source§

fn into_zip(self) -> Self::IntoZip

source§

type Drain<'a> = Zip<Drain<'a, Item>, <Rest as VecVariadic>::Drain<'a>> where Self: 'a

source§

fn drain<R>(&mut self, range: R) -> Self::Drain<'_>
where R: RangeBounds<usize> + Clone,

Implementors§