Trait tikv_client::util::iter::FlatMapOkIterExt[][src]

pub trait FlatMapOkIterExt: Iterator + Sized {
    fn flat_map_ok<U, F, Ti, I, E>(self, f: F) -> FlatMapOk<Self, F, Ti, E>

Notable traits for FlatMapOk<U, F, Ti, E>

impl<T: IntoIterator<IntoIter = Ti>, U: Iterator<Item = Result<I, E>>, F: FnMut(I) -> T, Ti: Iterator<Item = T::Item>, I, E> Iterator for FlatMapOk<U, F, Ti, E> type Item = Result<T::Item, E>;

    where
        Self: Iterator<Item = Result<I, E>>,
        U: IntoIterator,
        F: FnMut(I) -> U,
        Ti: Iterator
, { ... } }

Extension trait to iterators to add flat_map_ok.

Provided methods

fn flat_map_ok<U, F, Ti, I, E>(self, f: F) -> FlatMapOk<Self, F, Ti, E>

Notable traits for FlatMapOk<U, F, Ti, E>

impl<T: IntoIterator<IntoIter = Ti>, U: Iterator<Item = Result<I, E>>, F: FnMut(I) -> T, Ti: Iterator<Item = T::Item>, I, E> Iterator for FlatMapOk<U, F, Ti, E> type Item = Result<T::Item, E>;
where
    Self: Iterator<Item = Result<I, E>>,
    U: IntoIterator,
    F: FnMut(I) -> U,
    Ti: Iterator
[src]

Flattens an iterator of iterators into a single iterator. The outer iterator returns a Result; if there is any error, that error is preserved in the output. Any Ok values are fed into the function f which must produce an iterator (or value that can be converted into an iterator), that iterator is iterated into the output with each value wrapped in an Ok.

Loading content...

Implementors

impl<I: Iterator> FlatMapOkIterExt for I[src]

Loading content...