id_effect 0.7.0

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
//! Ex 068 — `Stream::from_effect` lifts a one-shot effect yielding a `Vec` into a stream.
use id_effect::Exit;
use id_effect::{Stream, succeed};

fn main() {
  let s = Stream::<i32, ()>::from_effect(succeed(vec![1, 2, 3]));
  assert_eq!(s.run_collect().block_on(), Exit::succeed(vec![1, 2, 3]));
  println!("068_stream_from_effect ok");
}