Trait fallible_iterator::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,