try-insert-ext 0.1.0

Extends various types with `try_insert_with` methods.
Documentation
  • Coverage
  • 100%
    8 out of 8 items documented4 out of 4 items with examples
  • Size
  • Source code size: 12.28 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.5 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • marsolk/try-insert-ext
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • marsolk

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.