id_effect 0.2.0

Effect<A, E, R> (sync + async), context/layers, pipe — interpreter-style, no bundled executor
Documentation
1
2
3
4
5
6
7
8
9
10
//! Ex 028 — Failed layers propagate `Err` from `build`.
use id_effect::{Layer, LayerFn, Tagged, service_key};

service_key!(struct K);

fn main() {
  let bad = LayerFn(|| Err::<Tagged<K, u8>, &'static str>("no"));
  assert_eq!(bad.build(), Err("no"));
  println!("028_layer_build_errors ok");
}