Expand description
Pipeline execution support
This module provides pipeline functionality similar to the JavaScript
$.process-runner-pipeline.mjs module. It allows chaining commands
together with the output of one command becoming the input of the next.
§Usage
use command_stream::{Pipeline, run};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create a pipeline
let result = Pipeline::new()
.add("echo hello world")
.add("grep world")
.add("wc -l")
.run()
.await?;
println!("Output: {}", result.stdout);
Ok(())
}Structs§
- Pipeline
- A pipeline of commands to be executed sequentially
- Pipeline
Builder - Builder for piping commands together
Traits§
- Pipeline
Ext - Extension trait to add
.pipe()method to ProcessRunner