tryCatchIntoResultAsync
This function converts the returend value from producer into Ok(T)
.
If producer throw a something, this returns it with wrapping Err(unknown)
.
NOTE:
- An user should narrow the scope of producer to make it predictable that is in
Err(E)
. - Basically, we don't recomment to use this to create a
Result<T, E>
. Generally, you should define anErr(E)
by depending on an use case context Use this operator just to make a bridge to existing codebase that you cannot inspect deeply to details.