ApplyOnce

Trait ApplyOnce 

Source
pub trait ApplyOnce<Rhs> {
    type Output;

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

The ApplyOnce trait consumes the container and applies the given function to every element before returning a new container with the results.

Required Associated Types§

Required Methods§

Source

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

Implementations on Foreign Types§

Source§

impl<U, V, F> ApplyOnce<F> for Option<U>
where F: FnOnce(U) -> V,

Source§

type Output = Option<V>

Source§

fn apply_once(self, f: F) -> Self::Output

Implementors§