#function #pipeline

another_pipe_macro

Adds a macro for composing functions

3 releases

Uses new Rust 2021

0.1.2 Sep 12, 2022
0.1.1 Sep 12, 2022
0.1.0 Sep 12, 2022

#581 in Rust patterns

Download history 26/week @ 2022-09-06 47/week @ 2022-09-13

73 downloads per month

MIT license

4KB

another_pipe_macro

This crate provides a pipe macro to easily compose functions together with a new syntax preventing nested calls which are hard to read and understand.

example usage:

use another_pipe_macro::pipe;

let res = pipe!( "32" => str::parse::<i32> => Result::unwrap);

assert_eq!(res, 32);

Should you use this crate?

No.

It is meant as an exercice in writing macros and publishing to crates.io, and possibly lacks features. If you want a more mature crate, use the pipeline crate.


lib.rs:

This crate provides a pipe macro to easily compose functions together with a new syntax preventing nested calls which are hard to read and understand.

example usage:

use another_pipe_macro::pipe;

let res = pipe!( "32" => str::parse::<i32> => Result::unwrap);

assert_eq!(res, 32);

Should you use this crate?

No.

It is meant as an exercice in writing macros and publishing to crates.io, and possibly lacks features. If you want a more mature crate, use the pipeline crate.

No runtime deps