Trait options_results::ResultIter [] [src]

pub trait ResultIter: Iterator where Self: Sized, Self::Item: _ResultTrait {
    fn unwrap(self) -> Unwrap<Self> { ... }
    fn unwrap_or(self, def: Self::Item::Type) -> UnwrapOr<Self> { ... }
    fn count_ok(self) -> usize { ... }
    fn count_err(self) -> usize { ... }
    fn count_ok_err(self) -> (usize, usize) { ... }
    fn find_ok(&mut self) -> Option<Self::Item::Type> { ... }
    fn find_err(&mut self) -> Option<Self::Item::ErrType> { ... }
    fn has_ok(&mut self) -> bool { ... }
    fn has_err(&mut self) -> bool { ... }
    fn ok_iter(self) -> OkIter<Self> { ... }
    fn err_iter(self) -> ErrIter<Self> { ... }
}

Add some methods for the iterator of Result<T, E>.

Provided Methods

Create an iterator which yields the unwrapped value as the next value. (Unwrap<I>::next() will panic if the value is Err(_).)

Create an iterator which yields the unwrapped value or a default as the next value.

Count the number of Ok(_) in this iterator.

Count the number of Err(_) in this iterator.

Count the number of Ok(_) and Err(_) in this iterator. Return a tuple as (number of Ok value, number of Err value)

Searches for an element of an iterator that the value is Ok(_). If each element of the iterator all equal Err(_), it returns None.

Searches for an element of an iterator that the value is Err(_). If each element of the iterator all equal Ok(_), it returns None.

Tests if any element of the iterator are Ok(_).

Tests if any element of the iterator are Err(_).

Create an iterator which yields unwrapped Ok(_) value.

Create an iterator which yields unwrapped Err(_) value.

Implementors