WithLabelledGeneric

Trait WithLabelledGeneric 

Source
pub trait WithLabelledGeneric: LabelledGeneric {
    // Required methods
    fn hmap<U: LabelledGeneric, F>(self, f: F) -> U
       where Self::Repr: HMappable<Poly<F>, Output = U::Repr>;
    fn hzip<U: LabelledGeneric, TU: LabelledGeneric<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 LabelledGeneric without having to explicitly call LabelledGeneric::from and LabelledGeneric::into

Required Methods§

Source

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

Source

fn hzip<U: LabelledGeneric, TU: LabelledGeneric<Repr = <Self::Repr as HZippable<U::Repr>>::Zipped>>( self, other: U, ) -> TU
where 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>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§