Crates.io | plumb |
lib.rs | plumb |
version | 0.2.0 |
source | src |
created_at | 2021-09-06 23:46:59.083385 |
updated_at | 2021-09-15 20:46:51.536625 |
description | A functional, async pipeline framework |
homepage | |
repository | https://github.com/ear7h/plumb |
max_upload_size | |
id | 447746 |
size | 34,938 |
A pipeline framework
pub async fn test() -> Result<bool, f32> {
async fn always_true(_a : i32, _b : i32, _s : &str) -> bool {
true
}
id::<i32>()
.bind(20 as i32)
.bind("hello")
.aseq(always_true)
.tuple()
.seq(|b : bool| {
Ok((!b,))
})
.map(|b:bool| {
!b
})
.map_tuple()
.map_bind("abc")
.amap(|_b:bool, _s : &str| async {
false
})
.map_tuple()
.and_then(|_| {
Err(1.1)
})
.run(12).await
}
TODO:
map_err
or_*
methodsiter_parallel
, fold_parallel