Crate pipa

Source
Expand description

pipa is a declarative macro for pipe operator in Rust to support chaining multiple expressions.

  • pipa!: Supports only plain expressions(non-try-able and not async). When you want to make sure only plain values chained.
  • pipa_try!: Supports only expressions returning try-able values like Option and Result. When you want to implement ROP pattern.
  • pipa_await_try!: Supports only async expressions return try-able values. When you want to ROP on async functions only.
  • p!: Supports mixes expressions:
    • functions
    • associated functions
    • methods
    • async functions
    • async associated functions
    • async methods
    • functions returning try-able value
    • associated functions returning try-able value
    • methods returning try-able value
    • async functions returning try-able value
    • async methods returning try-able value
    • async associated functions returning try-able value

Macros§

p
p! supports all mixes of expressions
pipa
pipa! only supports plain expressions(non-try-able and not async).
pipa_await_try
pipa_await_try only! supports async expressions returning try-able value.
pipa_try
pipa_try! only supports expressions returning try-able value.