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 defines an interface for objects capable of consuming themselves to apply the given function onto themselves or their elements to produce some output.

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, rhs: F) -> <Option<U> as ApplyOnce<F>>::Output

Implementors§