pub trait Apply<'a, A>: Functor<'a, A> {
type Target<T>
where T: 'a,
A: 'a;
// Required method
fn apply<B>(
self,
f: <Self as Apply<'a, A>>::Target<ApplyFn<'a, A, B>>,
) -> <Self as Apply<'a, A>>::Target<B>
where B: 'a;
}
Expand description
Apply
takes an F<Fn(A) -> B>
(or, rather, an F<ApplyFn<'a,A, B>>
specifically) and applies it to an F<A>
to produce an F<B>
.
Required Associated Types§
Required Methods§
fn apply<B>(
self,
f: <Self as Apply<'a, A>>::Target<ApplyFn<'a, A, B>>,
) -> <Self as Apply<'a, A>>::Target<B>where
B: 'a,
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.