Trait OffThreadExt

Source
pub trait OffThreadExt: Iterator {
    // Required method
    fn off_thread(self) -> IntoIter<Self::Item>;
}

Required Methods§

Source

fn off_thread(self) -> IntoIter<Self::Item>

Transform this iterator into an off-thread iterator: the next() call happen on a separate worker thread, so the iterator and the body of the loop run concurrently.

Implementors§

Source§

impl<T> OffThreadExt for T
where T: Iterator + Send + 'static, T::Item: Send + 'static,