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 030 — `service_def!` pairs a key with a service alias.
use id_effect::{service, service_def};

service_def!(struct DbKey as DbSvc => u32);

fn main() {
  let s: DbSvc = service::<DbKey, _>(7);
  assert_eq!(s.value, 7);
  println!("030_service_def ok");
}