[][src]Trait frunk_core::hlist::IntoTuple2

pub trait IntoTuple2 {
    type HeadType;
    type TailOutput;
    fn into_tuple2(self) -> (Self::HeadType, Self::TailOutput);
}

Trait for transforming an HList into a nested tuple.

This trait is part of the implementation of the inherent method HCons::into_tuple2. Please see that method for more information.

This operation is not useful in generic contexts, so it is unlikely that you should ever need to import this trait. Do not worry; if you have an HList of known type, then list.into_tuple2() should "just work," even without the trait.

Associated Types

type HeadType

The 0 element in the output tuple

type TailOutput

The 1 element in the output tuple

Loading content...

Required methods

fn into_tuple2(self) -> (Self::HeadType, Self::TailOutput)

Turns an HList into nested Tuple2s, which are less troublesome to pattern match and have a nicer type signature.

Please see the inherent method for more information.

Loading content...

Implementors

impl<T, Tail> IntoTuple2 for HCons<T, Tail> where
    Tail: IntoTuple2
[src]

type HeadType = T

type TailOutput = (<Tail as IntoTuple2>::HeadType, <Tail as IntoTuple2>::TailOutput)

impl<T1, T2> IntoTuple2 for HCons<T1, HCons<T2, HNil>>[src]

type HeadType = T1

type TailOutput = T2

Loading content...