Trait iter_tools::IterExt

source ·
pub trait IterExtwhere
    Self: Iterator,{
    // Required method
    fn map_result<F, RE, El>(self, f: F) -> Result<Vec<El>, RE>
       where Self: Sized + Clone,
             F: FnMut(<Self as Iterator>::Item) -> Result<El, RE>,
             RE: Debug;
}
Expand description

Extension of iterator.

Required Methods§

source

fn map_result<F, RE, El>(self, f: F) -> Result<Vec<El>, RE>where Self: Sized + Clone, F: FnMut(<Self as Iterator>::Item) -> Result<El, RE>, RE: Debug,

Iterate each element and return core::Result::Err if any element is error.

Implementors§

source§

impl<Iterator> IterExt for Iteratorwhere Iterator: Iterator,