Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 988 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 988 Bytes

Travis CI Build Status dpc on crates.io dpc Gitter Chat

insideout - Wrap composed types inside-out

Update: As of 1.33 a functionality like this is available in stdlib (at least for simple type). For iterators you can use iterator.map(Result::transpose) or iterator.map(Option::transpose) (thread).

Turn Option<Result<O, E>> into <Result<Option<O>, E>> and the other way around. Also for Iterators and potentially other types.

Feel free to submit PR for other types where this operation makes sense.