-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide stream functions to handle Result streams #348
Conversation
Add a `ResultStream` trait providing functions modeled after the native Result type, if their stream counterpart is meaningful. This includes functions to extract and map `Ok` or `Err` variants, as well as unwrapping, and chaining results with `and_then`. Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
These look good, thanks! Do you have any thoughts about how / whether to blend these with |
We could definitely merge it with ok_err.rs. Let me take a look! |
Scanning, I think the main difference is that |
It seems more intuitive to keep |
Is there a reason that |
Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
Yep, good point. Definitely easier to define |
Looks good; thanks for the PR! |
Thanks a lot! What about pushing a new release to crates? |
That sounds like a responsible thing to do! It's been .. almost a year I think? Maybe more. I'll investigate today! |
Add a
ResultStream
trait providing functions modeled after the nativeResult type, if their stream counterpart is meaningful. This includes
functions to extract and map
Ok
orErr
variants, as well asunwrapping, and chaining results with
and_then
.Signed-off-by: Moritz Hoffmann antiguru@gmail.com