Crate fallible_streaming_iterator

Source
Expand description

Fallible, streaming iteration.

FallibleStreamingIterator differs from the standard library’s Iterator trait in two ways: iteration can fail, resulting in an error, and only one element of the iteration is available at any time.

While these iterators cannot be used with Rust for loops, while let loops offer a similar level of ergonomics:

while let Some(value) = it.next()? {
    // use value
}

Structs§

Convert
An iterator which wraps a normal Iterator.
Empty
An iterator over no items.
Filter
An iterator which filters elements with a predicate.
Fuse
An iterator which is well-behaved at the beginning and end of iteration.
Map
An iterator which applies a transform to elements.
MapErr
An iterator which applies a transform to errors.
MapRef
An iterator which applies a transform to elements.
Skip
An iterator which skips a number of initial elements.
SkipWhile
An iterator which skips initial elements matching a predicate.
Take
An iterator which only returns a number of initial elements.
TakeWhile
An iterator which only returns initial elements matching a predicate.

Traits§

DoubleEndedFallibleStreamingIterator
A fallible, streaming iterator which can be advanced from either end.
FallibleStreamingIterator
A fallible, streaming iterator.

Functions§

convert
Converts a normal Iterator over Results of references into a FallibleStreamingIterator.
empty
Returns an iterator over no items.