Does anyone have an example of going from an Iterator of type Result<T, SomeError> to Iterator of type T, while handling all errors? I can see how this could be done with `for x in y` syntax, but I'm wondering if this can be done using combinators. Can it?
Oh oops, my bad! -- should've been more clear, haha.
This looks very cool! -- do you maybe have an example of how I'd use it? @Argorak mentioned made an example of using `collect`. Is this the same?
-
-
Yes, literally if you have an iterator of Rssult<A, E> you can collect it into a Result<FromIterator<A>, E> (warning pseudocode but hopefully it makes sense) where on the first error it returns Err(E).
-
ah yeah, that makes a lot of sense! Another question: does this buffer the incoming data until the underlying iterator is done? It does right?
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
