Expand description
§pipei
pipei provides pipe-style partial application combinators.
For each arity i ≥ 0, enabling feature "i" exports:
Pipe{i}Ref— borrow-based pipesPipe{i}— by-value pipesTap{i}Ref— borrow-based taps (discard return, returnselffor chaining)Tap{i}— by-value taps (discard return, returnselffor chaining)
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)
self.tap{i}(f)(a1..ai) = { let _ = f(&mut self, a1..ai); self }
self.tap{i}_with(proj, f)(a1..ai) = { let _ = f(proj(&self), a1..ai); &self }
self.tap{i}_with_mut(proj, f)(a1..ai) = { let _ = f(proj(&mut self), a1..ai); &mut self }Only the arities whose numeric feature is enabled are compiled.
Structs§
Traits§
- Pipe0
- By-value arity-0 piping.
- Pipe0
Ref - 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). - Pipe1
Ref - Pipe-style helpers for partial application of
(first, A1..A1) -> Rfunctions. - Pipe2
Ref - Pipe-style helpers for partial application of
(first, A1..A2) -> Rfunctions. - Pipe3
Ref - Pipe-style helpers for partial application of
(first, A1..A3) -> Rfunctions. - Pipe4
Ref - Pipe-style helpers for partial application of
(first, A1..A4) -> Rfunctions. - Pipe5
Ref - Pipe-style helpers for partial application of
(first, A1..A5) -> Rfunctions. - Tap0
- Tap0Ref
- Tap1
- Adds by-value tap helpers for arity 1 (requires
Self: Sized). - Tap2
- Adds by-value tap helpers for arity 2 (requires
Self: Sized). - Tap3
- Adds by-value tap helpers for arity 3 (requires
Self: Sized). - Tap4
- Adds by-value tap helpers for arity 4 (requires
Self: Sized). - Tap5
- Adds by-value tap helpers for arity 5 (requires
Self: Sized). - Tap1Ref
- Tap-style helpers for calling
(first, A1..A1) -> Rfor side effects. - Tap2Ref
- Tap-style helpers for calling
(first, A1..A2) -> Rfor side effects. - Tap3Ref
- Tap-style helpers for calling
(first, A1..A3) -> Rfor side effects. - Tap4Ref
- Tap-style helpers for calling
(first, A1..A4) -> Rfor side effects. - Tap5Ref
- Tap-style helpers for calling
(first, A1..A5) -> Rfor side effects.