try-insert-ext

Crates.iotry-insert-ext
lib.rstry-insert-ext
version0.1.0
sourcesrc
created_at2021-02-22 00:44:24.387302
updated_at2021-02-22 00:44:24.387302
descriptionExtends various types with `try_insert_with` methods.
homepage
repositoryhttps://gitlab.com/marsolk/try-insert-ext
max_upload_size
id358726
size12,654
Kevin Marsolais (marsolk)

documentation

README

try-insert-ext

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.

Commit count: 1

cargo fmt