Expand description
Provides extension traits for Option and map Entry types, adding
try_insert methods. These methods take possibly empty containers, and if
empty, run an initialization function. If this function errors, an error is
returned. Otherwise, the initialized value is returned.
Traitsยง
- Entry
Insert Ext - Extends map entries with
or_try_insert_withandor_try_insert_with_key. - Option
Insert Ext - Extends
Optionwithget_or_try_insert_with. - SetInsert
Ext - Extends sets with
get_or_try_insert_with.