Trait frunk::hlist::HZippable

source ·
pub trait HZippable<Other> {
    type Zipped: HList;

    // Required method
    fn zip(self, other: Other) -> Self::Zipped;
}
Expand description

Trait for zipping HLists

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

You only need to import this trait when working with generic HLists of unknown type. If the type of everything is known, then list.zip(list2) should “just work” even without the trait.

Required Associated Types§

Required Methods§

source

fn zip(self, other: Other) -> Self::Zipped

Zip this HList with another one.

Please see the inherent method for more information.

Implementors§

source§

impl HZippable<HNil> for HNil

§

type Zipped = HNil

source§

impl<H1, T1, H2, T2> HZippable<HCons<H2, T2>> for HCons<H1, T1>where T1: HZippable<T2>,

§

type Zipped = HCons<(H1, H2), <T1 as HZippable<T2>>::Zipped>