Pipe5

Trait Pipe5 

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

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

Provided Methods§

Source

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

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

Semantics: self.pipe5(f)(a1..a5) == f(self, a1..a5).

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