Pipe3

Trait Pipe3 

Source
pub trait Pipe3: Sized + Pipe3Ref {
    // Provided method
    fn pipe3<R, A1, A2, A3>(
        self,
        f: impl FnOnce(Self, A1, A2, A3) -> R,
    ) -> impl FnOnce(A1, A2, A3) -> R { ... }
}
Expand description

Adds by-value partial application for arity 3 (requires Self: Sized).

Provided Methods§

Source

fn pipe3<R, A1, A2, A3>( self, f: impl FnOnce(Self, A1, A2, A3) -> R, ) -> impl FnOnce(A1, A2, A3) -> R

Partially applies f by moving self into the returned closure. The closure takes (A1..A3).

Semantics: self.pipe3(f)(a1..a3) == f(self, a1..a3).

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.

Implementors§

Source§

impl<T: Sized> Pipe3 for T