Trait options_results::OptionIter [] [src]

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

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