Trait options_results::OptionIter [] [src]

pub trait OptionIter<T>: Iterator<Item = Option<T>> where
    Self: Sized
{ fn unwrap(self) -> Unwrap<Self, T> { ... } fn unwrap_or(self, def: T) -> UnwrapOr<Self, T> { ... } fn count_some(self) -> usize { ... } fn find_some(&mut self) -> Option<T> { ... } fn has_some(&mut self) -> bool { ... } fn has_none(&mut self) -> bool { ... } fn some_iter(self) -> SomeIter<Self, T> { ... } }

Add some methods for the iterator of Option<T>.

Provided Methods

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

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

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

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

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

Tests if any element of the iterator are None.

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

Implementors