Trait frunk_utils::WithGeneric
source · 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§
fn hmap<U: Generic, F>(self, f: F) -> Uwhere 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 ) -> TUwhere 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>,
Object Safety§
This trait is not object safe.