Skip to main content

pipeline

Function pipeline 

Source
pub fn pipeline<F, Fut>(stages: Vec<(String, F)>) -> Vec<Arc<dyn Task>>
where F: Fn(Arc<Context>) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<TaskOutput, TaskError>> + Send + 'static,
Expand description

Build a linear pipeline: stages[0] -> stages[1] -> ....

Each stage is a (id, closure) pair; stage n is made to depend on stage n-1, so they execute strictly in order.