id_effect 0.10.1

Effect<A, E, R>: lazy Send effects over a typed capability list, run on a fiber runtime (Tokio executor), with layers, streams, schedules and coordination
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Ex 037 — `from_async` wraps a real `async` step.
use id_effect::Exit;
use id_effect::{Effect, from_async};

fn main() {
  let eff: Effect<u8, ()> = from_async(|| async move {
    core::future::ready(()).await;
    Ok(42)
  });
  assert_eq!(eff.block_on(), Exit::succeed(42));
  println!("037_from_async_basic ok");
}