fluent_pipeline

Crates.iofluent_pipeline
lib.rsfluent_pipeline
version
sourcesrc
created_at2025-02-03 13:39:11.332698+00
updated_at2025-02-03 13:39:11.332698+00
descriptionA lightweight pipeline system for Rust.
homepage
repositoryhttps://github.com/m1guelpf/pipeline-rs
max_upload_size
id1540627
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Miguel Piedrafita (m1guelpf)

documentation

README

Pipeline for Rust

crates.io download count badge docs.rs

A convenient way to "pipe" a given input through a series of invokable classes, closures, or callables, giving each class the opportunity to inspect or modify the input and invoke the next callable in the pipeline.

Usage

To get started, create a new pipeline with the send method, passing the input you want to pipe through the pipeline. Then, use the through method to add a series of pipes (either classes implenting the Pipe trait, or closures) to the pipeline. Finally, call the then method to transform and get the final output.

You can also append Pipes to an existing pipeline using the pipe method, or use thenReturn to get the final output without transforming it.

use fluent_pipeline::Pipeline;

Pipeline::send(project).through(&[
    PipeType::Pipe(BuildProject()),
    PipeType::Pipe(UploadProject()),
    PipeType::Pipe(DeployProject()),
    PipeType::Fn(|project| {
        // ...

        return project
    })
]).run()

License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 1

cargo fmt