Apply

Trait Apply 

Source
pub trait Apply<Rhs> {
    type Output;

    // Required method
    fn apply(&self, rhs: Rhs) -> Self::Output;
}
Expand description

Apply establishes a binary operator for applying a given object, typically a function or closure, onto a target object, producing some output.

Required Associated Types§

Required Methods§

Source

fn apply(&self, rhs: Rhs) -> Self::Output

Implementations on Foreign Types§

Source§

impl<U, V, F> Apply<F> for Option<U>
where F: Fn(&U) -> V,

Source§

type Output = Option<V>

Source§

fn apply(&self, rhs: F) -> <Option<U> as Apply<F>>::Output

Source§

impl<U, V, F> Apply<F> for Box<U>
where F: Fn(&U) -> V,

Source§

type Output = Box<V>

Source§

fn apply(&self, rhs: F) -> <Box<U> as Apply<F>>::Output

Source§

impl<U, V, F> Apply<F> for Vec<U>
where F: Fn(&U) -> V, Vec<V>: FromIterator<V>,

Source§

type Output = Vec<V>

Source§

fn apply(&self, rhs: F) -> <Vec<U> as Apply<F>>::Output

Source§

impl<const N: usize, U, V, F> Apply<F> for [U; N]
where F: Fn(&U) -> V,

Source§

type Output = [V; N]

Source§

fn apply(&self, rhs: F) -> <[U; N] as Apply<F>>::Output

Implementors§