pub trait Applicative: Functor + Lift {
// Required method
fn lift2<TIn1, TIn2, TOut, F>(
f: F,
x1: &<Self as WithTypeArg<TIn1>>::Type,
x2: &<Self as WithTypeArg<TIn2>>::Type,
) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TIn1> + WithTypeArg<TIn2> + WithTypeArg<TOut>,
F: Fn(&TIn1, &TIn2) -> TOut;
// Provided method
fn ap<TIn, TOut, TFunc>(
f: &<Self as WithTypeArg<TFunc>>::Type,
x: &<Self as WithTypeArg<TIn>>::Type,
) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TFunc> + WithTypeArg<TIn> + WithTypeArg<TOut>,
TFunc: Fn(&TIn) -> TOut { ... }
}
Required Methods§
fn lift2<TIn1, TIn2, TOut, F>( f: F, x1: &<Self as WithTypeArg<TIn1>>::Type, x2: &<Self as WithTypeArg<TIn2>>::Type, ) -> <Self as WithTypeArg<TOut>>::Type
Provided Methods§
fn ap<TIn, TOut, TFunc>( f: &<Self as WithTypeArg<TFunc>>::Type, 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.