Trait rayon::iter::IndexedParallelIterator [] [src]

pub trait IndexedParallelIterator: ExactParallelIterator {
    fn with_producer<CB: ProducerCallback<Self::Item>>(self,
                                                       callback: CB)
                                                       -> CB::Output; fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter> where Z: IntoParallelIterator, Z::Iter: IndexedParallelIterator { ... } fn cmp<I>(self, other: I) -> Ordering where I: IntoParallelIterator<Item=Self::Item>,
              I::Iter: IndexedParallelIterator,
              Self::Item: Ord
{ ... } fn partial_cmp<I>(self, other: I) -> Option<Ordering> where I: IntoParallelIterator,
              I::Iter: IndexedParallelIterator,
              Self::Item: PartialOrd<I::Item>
{ ... } fn eq<I>(self, other: I) -> bool where I: IntoParallelIterator,
              I::Iter: IndexedParallelIterator,
              Self::Item: PartialEq<I::Item>
{ ... } fn ne<I>(self, other: I) -> bool where I: IntoParallelIterator,
              I::Iter: IndexedParallelIterator,
              Self::Item: PartialEq<I::Item>
{ ... } fn lt<I>(self, other: I) -> bool where I: IntoParallelIterator,
              I::Iter: IndexedParallelIterator,
              Self::Item: PartialOrd<I::Item>
{ ... } fn le<I>(self, other: I) -> bool where I: IntoParallelIterator,
              I::Iter: IndexedParallelIterator,
              Self::Item: PartialOrd<I::Item>
{ ... } fn gt<I>(self, other: I) -> bool where I: IntoParallelIterator,
              I::Iter: IndexedParallelIterator,
              Self::Item: PartialOrd<I::Item>
{ ... } fn ge<I>(self, other: I) -> bool where I: IntoParallelIterator,
              I::Iter: IndexedParallelIterator,
              Self::Item: PartialOrd<I::Item>
{ ... } fn enumerate(self) -> Enumerate<Self> { ... } fn skip(self, n: usize) -> Skip<Self> { ... } fn take(self, n: usize) -> Take<Self> { ... } fn position_any<P>(self, predicate: P) -> Option<usize> where P: Fn(Self::Item) -> bool + Sync { ... } fn position_first<P>(self, predicate: P) -> Option<usize> where P: Fn(Self::Item) -> bool + Sync { ... } fn position_last<P>(self, predicate: P) -> Option<usize> where P: Fn(Self::Item) -> bool + Sync { ... } fn rev(self) -> Rev<Self> { ... } fn with_min_len(self, min: usize) -> MinLen<Self> { ... } fn with_max_len(self, max: usize) -> MaxLen<Self> { ... } }

An iterator that supports "random access" to its data, meaning that you can split it at arbitrary indices and draw data from those points.

Required Methods

Internal method used to define the behavior of this parallel iterator. You should not need to call this directly.

This method converts the iterator into a producer P and then invokes callback.callback() with P. Note that the type of this producer is not defined as part of the API, since callback must be defined generically for all producers. This allows the producer type to contain references; it also means that parallel iterators can adjust that type without causing a breaking change.

See the README for more details on the internals of parallel iterators.

Provided Methods

Iterate over tuples (A, B), where the items A are from this iterator and B are from the iterator given as argument. Like the zip method on ordinary iterators, if the two iterators are of unequal length, you only get the items they have in common.

Lexicographically compares the elements of this ParallelIterator with those of another.

Lexicographically compares the elements of this ParallelIterator with those of another.

Determines if the elements of this ParallelIterator are equal to those of another

Determines if the elements of this ParallelIterator are unequal to those of another

Determines if the elements of this ParallelIterator are lexicographically less than those of another.

Determines if the elements of this ParallelIterator are less or equal to those of another.

Determines if the elements of this ParallelIterator are lexicographically greater than those of another.

Determines if the elements of this ParallelIterator are less or equal to those of another.

Yields an index along with each item.

Creates an iterator that skips the first n elements.

Creates an iterator that yields the first n elements.

Searches for some item in the parallel iterator that matches the given predicate, and returns its index. Like ParallelIterator::find_any, the parallel search will not necessarily find the first match, and once a match is found we'll attempt to stop processing any more.

Searches for the first item in the parallel iterator that matches the given predicate, and returns its index.

Like ParallelIterator::find_first, once a match is found, all attempts to the right of the match will be stopped, while attempts to the left must continue in case an earlier match is found.

Note that not all parallel iterators have a useful order, much like sequential HashMap iteration, so "first" may be nebulous.

Searches for the last item in the parallel iterator that matches the given predicate, and returns its index.

Like ParallelIterator::find_last, once a match is found, all attempts to the left of the match will be stopped, while attempts to the right must continue in case a later match is found.

Note that not all parallel iterators have a useful order, much like sequential HashMap iteration, so "last" may be nebulous.

Produces a new iterator with the elements of this iterator in reverse order.

Sets the minimum length of iterators desired to process in each thread. Rayon will not split any smaller than this length, but of course an iterator could already be smaller to begin with.

Sets the maximum length of iterators desired to process in each thread. Rayon will try to split at least below this length, unless that would put it below the length from with_min_len(). For example, given min=10 and max=15, a length of 16 will not be split any further.

Implementors