extra_result 1.0.1

Add extra methods to `Result` enum.
Documentation
  • Coverage
  • 100%
    13 out of 13 items documented0 out of 12 items with examples
  • Size
  • Source code size: 24.29 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 220.57 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • NattapongSiri/extra-result-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • NattapongSiri

extra-result

Add extra methods to Result by use a trait ExtraResult.

Current methods added is

  • map_fut
  • map_or_fut
  • map_or_else_fut
  • map_err_fut
  • inspect_fut
  • inspect_err_fut
  • and_then_fut
  • or_else_fut
  • unwrap_or_else_fut
  • is_ok_and_fut
  • is_err_and_fut

All these methods is a mirror of a method of regular Result but it accept async function instead.

How to use.

Simply add use extra_result::*; to a source file that going to use above methods.

Note: The crate only provide single trait name ExtraResult. It is also possible to use extra_result::ExtraResult; instead of using wildcard but it won't make any different.