I believe that ideally cases like this should be handled by generators, i.e. you create a Generator<Yield=T, Return=io::Result<()>>
and use combinators on it. The semantic difference between such generators and Iterator<Item=io::Resutl<T>>
was briefly discussed in this thread.
1 Like