Trait FunctorExt

Source
pub trait FunctorExt: Functor {
    // Required method
    fn expand_and_collapse<Seed, Out>(
        seed: Seed,
        expand_layer: impl FnMut(Seed) -> <Self as Functor>::Layer<Seed>,
        collapse_layer: impl FnMut(<Self as Functor>::Layer<Out>) -> Out,
    ) -> Out;
}

Required Methods§

Source

fn expand_and_collapse<Seed, Out>( seed: Seed, expand_layer: impl FnMut(Seed) -> <Self as Functor>::Layer<Seed>, collapse_layer: impl FnMut(<Self as Functor>::Layer<Out>) -> Out, ) -> Out

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§

Source§

impl<X> FunctorExt for X
where X: Functor,