Trait 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!).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl VecVariadic for ()

Source§

type UnVec = ()

Source§

type IntoZip = Repeat<()>

Source§

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

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§

fn into_zip(self) -> Self::IntoZip

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§

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

Source§

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

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§

fn into_zip(self) -> Self::IntoZip

Source§

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

Implementors§