Apply

Trait Apply 

Source
pub trait Apply<Rhs> {
    type Output;

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

Apply defines an interface for objects capable of applying the given function onto itself or its elements to produce 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,

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§