Crate pipei

Crate pipei 

Source
Expand description

§pipei

pipei provides pipe-style partial application combinators.

For each arity i ≥ 0, enabling feature "i" exports:

  • Pipe{i}Ref — borrow-based pipes
  • Pipe{i} — by-value pipes

Laws (schematic):

self.pipe{i}(f)(a1..ai)                = f(self,            a1..ai)
self.pipe{i}_with(proj, f)(a1..ai)     = f(proj(&self),     a1..ai)
self.pipe{i}_with_mut(proj, f)(a1..ai) = f(proj(&mut self), a1..ai)

Only the arities whose numeric feature is enabled are compiled.

Traits§

Pipe0
By-value arity-0 piping.
Pipe0Ref
Borrow-based arity-0 piping.
Pipe1
Adds by-value partial application for arity 1 (requires Self: Sized).
Pipe2
Adds by-value partial application for arity 2 (requires Self: Sized).
Pipe3
Adds by-value partial application for arity 3 (requires Self: Sized).
Pipe4
Adds by-value partial application for arity 4 (requires Self: Sized).
Pipe5
Adds by-value partial application for arity 5 (requires Self: Sized).
Pipe1Ref
Pipe-style helpers for partial application of (first, A1..A1) -> R functions.
Pipe2Ref
Pipe-style helpers for partial application of (first, A1..A2) -> R functions.
Pipe3Ref
Pipe-style helpers for partial application of (first, A1..A3) -> R functions.
Pipe4Ref
Pipe-style helpers for partial application of (first, A1..A4) -> R functions.
Pipe5Ref
Pipe-style helpers for partial application of (first, A1..A5) -> R functions.