pub trait WithGeneric: Generic {
    // Required methods
    fn hmap<U: Generic, F>(self, f: F) -> U
       where Self::Repr: HMappable<Poly<F>, Output = U::Repr>;
    fn hzip<U: Generic, TU: Generic<Repr = <Self::Repr as HZippable<U::Repr>>::Zipped>>(
        self,
        other: U
    ) -> TU
       where Self::Repr: HZippable<U::Repr>;
    fn map_to_list<F, U>(
        self,
        f: F
    ) -> ConsList<U, <Self::Repr as MapToList<F, U>>::Output>
       where Self::Repr: MapToList<F, U>;
    fn for_each<F>(self, f: F)
       where Self::Repr: ForEach<F>;
}
Expand description

Convenience functions for the caller to map between similarly-shaped types implementing [Generic] without having to explicitly call [Generic::from] and [Generic::into]

Required Methods§

source

fn hmap<U: Generic, F>(self, f: F) -> Uwhere Self::Repr: HMappable<Poly<F>, Output = U::Repr>,

source

fn hzip<U: Generic, TU: Generic<Repr = <Self::Repr as HZippable<U::Repr>>::Zipped>>( self, other: U ) -> TUwhere Self::Repr: HZippable<U::Repr>,

source

fn map_to_list<F, U>( self, f: F ) -> ConsList<U, <Self::Repr as MapToList<F, U>>::Output>where Self::Repr: MapToList<F, U>,

source

fn for_each<F>(self, f: F)where Self::Repr: ForEach<F>,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Generic> WithGeneric for T