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
//! Ex 017 — `Cause::fail_option` extracts `Fail` payloads only.
use id_effect::Cause;

fn main() {
  assert_eq!(Cause::fail(7_u8).fail_option(), Some(7));
  assert_eq!(Cause::<u8>::die("x").fail_option(), None);
  println!("017_cause_optional ok");
}