#![allow(dead_code)] #[tokio::main] async fn main() { let pipeline = fama::Pipeline::pass(0) // Returning Error will halt the flow .ok_fn(|n: i32| async move { Ok::(n + 20) }) .await .ok_fn(|n: Result| async move { if n.is_ok() && n.unwrap() > 20 { Ok::("n > 20".into()) } else { Err(()) } }) .await; println!( "i32 result: {:#?}", pipeline.deliver_as::>() ); println!( "check i32 result: {:#?}", pipeline.deliver_as::>() ); }