There are 27 different methods to convert between Option/Result types and their contained types. Which one should I use?
I ask myself this question a lot, so I made a selection tool for Rust combinators!
You have to input your question like so:
I have in-type and I want out-type by ok-conversion or err-conversion.
For example,
I have
Option<T>
and I wantOption<U>
by running a closure turningT
intoOption<U>
or propagatingNone
You want:
Option::and_then
It works well enough right now, but I’m not a UI designer. If anyone with leet CSS/JS skills wants to make it look nicer, I’ll gladly except your PR.