How to make an iterator::filter_map / iterator::map_while but that return a Result (or Option)

I implicitly meant "with returning a Result" in there.

If you remove that requirement, then yes, there are a bunch of other options like the error_collector I demonstrate in Partition iterator - best practice and design guidance - #5 by scottmcm.