Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Cackbone/pipeline-macro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pipeline-macro

crates.io

A crate to create a pipeline in Rust.

How to use it ?

  • Define a pipeline with type in input and type in output
  • Use run method to run this pipeline

Basic example:

    let pipeline = pipeline! {
        i32
        => add2
        => div_by_3
        => mul_by_83
        ;-> f64
    };

    let result = pipeline.run(3); // ~= 110.6666..

Closure example:

    let pipeline = pipeline! {
        i32
        => |i: i32| i + 2
        => div_by_3
        => mul_by_83
        ;-> f64
    };

    let result = pipeline.run(3); // ~= 110.6666..

How to build ?

    cargo build

How to run tests ?

    cargo test

About

A crate to create a pipeline in Rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages