fallible_iterator

Trait IteratorExt

Source
pub trait IteratorExt {
    // Required methods
    fn transpose_into_fallible<T, E>(self) -> Convert<Self>
       where Self: Iterator<Item = Result<T, E>> + Sized;
    fn into_fallible<T>(self) -> IntoFallible<Self>
       where Self: Iterator<Item = T> + Sized;
}
Expand description

An extnsion-trait with set of useful methods to convert core::iter::Iterator into FallibleIterator

Required Methods§

Source

fn transpose_into_fallible<T, E>(self) -> Convert<Self>
where Self: Iterator<Item = Result<T, E>> + Sized,

Convert an iterator of Results into FallibleIterator by transposition

Source

fn into_fallible<T>(self) -> IntoFallible<Self>
where Self: Iterator<Item = T> + Sized,

Convert an iterator of anything into FallibleIterator by wrapping into Result<T, Infallible> where Infallible is an error that can never actually happen.

Implementors§

Source§

impl<I> IteratorExt for I
where I: Iterator,