Skip to main content

IteratorExtensions

Trait IteratorExtensions 

Source
pub trait IteratorExtensions: Iterator + Sized {
    // Provided methods
    fn try_map<U, E, F>(self, f: F) -> Result<impl Iterator<Item = U>, E>
       where F: FnMut(Self::Item) -> Result<U, E> { ... }
    fn to_vec(self) -> Vec<Self::Item> { ... }
    fn try_to_vec<T, E>(self) -> Result<Vec<T>, E>
       where Self: Iterator<Item = Result<T, E>> { ... }
}

Provided Methods§

Source

fn try_map<U, E, F>(self, f: F) -> Result<impl Iterator<Item = U>, E>
where F: FnMut(Self::Item) -> Result<U, E>,

Source

fn to_vec(self) -> Vec<Self::Item>

Source

fn try_to_vec<T, E>(self) -> Result<Vec<T>, E>
where Self: Iterator<Item = Result<T, E>>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§