| Crates.io | somok |
| lib.rs | somok |
| version | 1.5.0 |
| created_at | 2021-11-09 08:37:55.956659+00 |
| updated_at | 2022-03-15 09:55:28.444236+00 |
| description | A microlibrary for postfix Option/Result wrapping |
| homepage | |
| repository | https://github.com/JohnDowson/somok |
| max_upload_size | |
| id | 478790 |
| size | 5,889 |
Add following to your cargo toml:
somok = "1.0"
Then use postfix wrapping as follows:
use somok::{ Somok, Either };
fn foo() -> Result<Option<Either<String, Vec<u8>>>> {
String::from("Foobar").left().some().okay()
}