pub trait Functor: LinearFunctor {
// Required method
fn fmap<TIn, TOut, F>(
f: F,
x: &<Self as WithTypeArg<TIn>>::Type,
) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TIn> + WithTypeArg<TOut>,
F: Fn(&TIn) -> TOut;
// Provided method
fn fmapconst<TIn, TOut>(
e: &TOut,
x: &<Self as WithTypeArg<TIn>>::Type,
) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TIn> + WithTypeArg<TOut>,
TOut: Clone { ... }
}
Required Methods§
fn fmap<TIn, TOut, F>( f: F, x: &<Self as WithTypeArg<TIn>>::Type, ) -> <Self as WithTypeArg<TOut>>::Type
Provided Methods§
fn fmapconst<TIn, TOut>( e: &TOut, x: &<Self as WithTypeArg<TIn>>::Type, ) -> <Self as WithTypeArg<TOut>>::Type
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.