Crate or_type
Version 0.1.0
See all or_type's items
Generic either-or type, similar to Result but more generic.
Result
fn get_foo_or_bar(b: bool) -> Or<Foo, Bar> { if b { Or::Left(Foo {}) } else { Or::Right(Bar {}) } }