[][src]Trait collect_result::CollectResult

pub trait CollectResult<T, E> {
    fn collect_result<O: FromIterator<T> + Extend<T>>(self) -> Result<O, E>;
}

Short circuiting collect of an iterator

Required methods

fn collect_result<O: FromIterator<T> + Extend<T>>(self) -> Result<O, E>

Collects into a result from the iterator

Loading content...

Implementors

impl<T, E, I: Iterator<Item = Result<T, E>>> CollectResult<T, E> for I[src]

fn collect_result<O: FromIterator<T> + Extend<T>>(self) -> Result<O, E>[src]

Takes an iterator of results and tries to collect all Oks from it

Returns the Err if an item is ever Err short-circuting. That is, it will immediately return the error when it encounters the first one.

Loading content...