Trait Apply

Source
pub trait Apply<A, F, B>: Functor<A, B> + Lift3<A, F, B>
where F: Fn(A) -> B,
{ // Required method fn apply( self, f: <Self as Lift3<A, F, B>>::Target2, ) -> <Self as Lift<A, B>>::Target1; }
Expand description

Apply takes an F<Fn(A) -> B> and applies it to an F<A> to produce an F<B>.

Required Methods§

Source

fn apply( self, f: <Self as Lift3<A, F, B>>::Target2, ) -> <Self as Lift<A, B>>::Target1

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.

Implementations on Foreign Types§

Source§

impl<A, F, B> Apply<A, F, B> for Option<A>
where F: Fn(A) -> B,

Source§

fn apply( self, f: <Self as Lift3<A, F, B>>::Target2, ) -> <Self as Lift<A, B>>::Target1

Source§

impl<A, F, B> Apply<A, F, B> for LinkedList<A>
where A: Clone, F: Fn(A) -> B + Clone,

Source§

fn apply( self, f: <Self as Lift3<A, F, B>>::Target2, ) -> <Self as Lift<A, B>>::Target1

Source§

impl<A, F, B> Apply<A, F, B> for VecDeque<A>
where A: Clone, F: Fn(A) -> B + Clone,

Source§

fn apply( self, f: <Self as Lift3<A, F, B>>::Target2, ) -> <Self as Lift<A, B>>::Target1

Source§

impl<A, F, B> Apply<A, F, B> for Vec<A>
where A: Clone, F: Fn(A) -> B + Clone,

Source§

fn apply( self, f: <Self as Lift3<A, F, B>>::Target2, ) -> <Self as Lift<A, B>>::Target1

Source§

impl<A, F, B, E> Apply<A, F, B> for Result<A, E>
where F: Fn(A) -> B,

Source§

fn apply( self, f: <Self as Lift3<A, F, B>>::Target2, ) -> <Self as Lift<A, B>>::Target1

Implementors§