Pipe4

Trait Pipe4 

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

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

Provided Methods§

Source

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

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

Semantics: self.pipe4(f)(a1..a4) == f(self, a1..a4).

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> Pipe4 for T