fn while_some<T>(self) -> WhileSome<Self>
    where
        Self: ParallelIterator<'a, Item = Option<T>>,
        T: Send + 'a,
    {
        WhileSome::new(self)
    }
/// Creates an iterator over the `Some` items of this iterator, halting
/// as soon as any `None` is found.
///
/// # Examples
///
/// ```
/// use asparit::*;
/// use std::sync::atomic::{AtomicUsize, Ordering};
///
/// let counter = AtomicUsize::new(0);
/// let value = (0_i32..2048)
///     .into_par_iter()
///     .map(|x| {
///         counter.fetch_add(1, Ordering::SeqCst);
///         if x < 1024 {
///             Some(x)
///         } else {
///             None
///         }
///     })
///     .while_some()
///     .max()
///     .exec();
///
/// assert!(value < Some(1024));
/// assert!(counter.load(Ordering::SeqCst) < 2048); // should not have visited every single one
/// ```
Creates an iterator over the `Some` items of this iterator, halting
as soon as any `None` is found.
Creates an iterator over the ` Some ` items of this iterator halting as soon as any ` None ` is found .
fn while_some<T>(self) -> WhileSome<Self>
    where
        Self: ParallelIterator<'a, Item = Option<T>>,
        T: Send + 'a,
    {
        WhileSome::new(self)
    }
fn while_some < T > ( self ) -> WhileSome < Self > where Self : ParallelIterator < ' a , Item = Option < T > > , T : Send + ' a , { WhileSome :: new ( self ) }
Creates an iterator over the `Some` items of this iterator, halting
as soon as any `None` is found.
Creates an iterator over the ` Some ` items of this iterator halting as soon as any ` None ` is found .
self
self
examples
```
use asparit::*;
use std::sync::atomic::{AtomicUsize, Ordering}.



assert!(value < Some(1024));
assert!(counter.load(Ordering::SeqCst) < 2048); // should not have visited every single one
```
` ` ` use asparit :: * ; use std :: sync :: atomic :: { AtomicUsize Ordering } . assert! ( value < Some ( 1024 )) ; assert! ( counter . load ( Ordering :: SeqCst ) < 2048 ) ; // should not have visited every single one ` ` `