Map over a Ok, exactly as in map, but operating on the
value wrapped in an Err instead of the value wrapped in the
Ok. This is handy for when you need to line up a bunch of
different types of errors, or if you need an error of one shape to be in a
different shape to use somewhere else in your codebase.
Map over a
Ok
, exactly as inmap
, but operating on the value wrapped in anErr
instead of the value wrapped in theOk
. This is handy for when you need to line up a bunch of different types of errors, or if you need an error of one shape to be in a different shape to use somewhere else in your codebase.Examples