| Crates.io | try-insert-ext |
| lib.rs | try-insert-ext |
| version | 0.1.0 |
| created_at | 2021-02-22 00:44:24.387302+00 |
| updated_at | 2021-02-22 00:44:24.387302+00 |
| description | Extends various types with `try_insert_with` methods. |
| homepage | |
| repository | https://gitlab.com/marsolk/try-insert-ext |
| max_upload_size | |
| id | 358726 |
| size | 12,654 |
This library provides extension traits for std types, adding or_try_insert_with (or equivalent) methods for Option, map Entry types, and HashSet. These act similarly to or_insert_with methods, but taking a function that returns a Result, and inserting only if the function returns Ok, otherwise returning the Err.