id_effect 0.1.1

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
11
12
13
14
15
//! Ex 057 — `repeat_with_clock` uses an explicit clock for delays.
use id_effect::{Schedule, TestClock, repeat_with_clock, run_blocking, succeed};
use std::time::Instant;

fn main() {
  let clock = TestClock::new(Instant::now());
  let eff = repeat_with_clock(
    || succeed::<u32, (), ()>(1_u32),
    Schedule::recurs(1),
    clock,
    None,
  );
  let _ = run_blocking(eff, ());
  println!("057_repeat_with_clock ok");
}