| Crates.io | or_type |
| lib.rs | or_type |
| version | 0.1.0 |
| created_at | 2021-04-17 11:20:26.550156+00 |
| updated_at | 2021-04-17 11:20:26.550156+00 |
| description | Generic either-or type |
| homepage | https://gitlab.com/8BitKitKat/rust-or-type |
| repository | |
| max_upload_size | |
| id | 385713 |
| size | 4,041 |
Generic either-or type, similar to Result but more generic
fn get_foo_or_bar(b: bool) -> Or<Foo, Bar> {
if b {
Or::Left(Foo {})
} else {
Or::Right(Bar {})
}
}