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§

  • An iterator which wraps a normal Iterator.
  • An iterator over no items.
  • An iterator which filters elements with a predicate.
  • An iterator which is well-behaved at the beginning and end of iteration.
  • An iterator which applies a transform to elements.
  • An iterator which applies a transform to errors.
  • An iterator which applies a transform to elements.
  • An iterator which skips a number of initial elements.
  • An iterator which skips initial elements matching a predicate.
  • An iterator which only returns a number of initial elements.
  • An iterator which only returns initial elements matching a predicate.

Traits§

Functions§

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