[][src]Trait lhlist::iter::CollectIntoHList

pub trait CollectIntoHList {
    type Output;
    fn collect_into_hlist(self) -> Self::Output;
}

Collects an iterator (either ConsIterator or ValuesIterator) into a hetereogeneous cons-list.

The resulting cons-list does not necessarily maintain label information -- it typically returns a Cons-list instead of an LVCons-list. See CollectIntoLabeledHList for a version that returns a labeled cons-list.

For an example of usage, see the MapAdapter example.

Associated Types

type Output

Output type of collected list

Loading content...

Required methods

fn collect_into_hlist(self) -> Self::Output

Collects the contents of an iterator into a cons-list

Loading content...

Implementors

impl<'a, A> CollectIntoHList for ConsIterator<'a, Nil, A>[src]

type Output = Nil

impl<'a, A> CollectIntoHList for ValuesIterator<'a, Nil, A>[src]

type Output = Nil

impl<'a, A, H, T> CollectIntoHList for ConsIterator<'a, Cons<H, T>, A> where
    A: Adapter<&'a H>,
    ConsIterator<'a, T, A>: CollectIntoHList
[src]

type Output = Cons<<A as Adapter<&'a H>>::Output, <ConsIterator<'a, T, A> as CollectIntoHList>::Output>

impl<'a, A, L, T> CollectIntoHList for ValuesIterator<'a, LVCons<L, T>, A> where
    L: Label,
    A: Adapter<&'a L::AssocType>,
    ValuesIterator<'a, T, A>: CollectIntoHList
[src]

type Output = Cons<<A as Adapter<&'a L::AssocType>>::Output, <ValuesIterator<'a, T, A> as CollectIntoHList>::Output>

Loading content...