usesuper::plumbing::*; usesuper::*; use std::iter;
/// `Zip` is an iterator that zips up `a` and `b` into a single iterator /// of pairs. This struct is created by the [`zip()`] method on /// [`IndexedParallelIterator`] /// /// [`zip()`]: trait.IndexedParallelIterator.html#method.zip /// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html #[must_use = "iterator adaptors are lazy and do nothing unless consumed"] #[derive(Debug, Clone)] pubstruct Zip<A: IndexedParallelIterator, B: IndexedParallelIterator> {
a: A,
b: B,
}
impl<A, B> Zip<A, B> where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
{ /// Creates a new `Zip` iterator. pub(super) fn new(a: A, b: B) -> Self {
Zip { a, b }
}
}
impl<A, B> ParallelIterator for Zip<A, B> where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
{ type Item = (A::Item, B::Item);
fn drive_unindexed<C>(self, consumer: C) -> C::Result where
C: UnindexedConsumer<Self::Item>,
{
bridge(self, consumer)
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.