| <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Parallel version of the standard iterator trait."><meta name="keywords" content="rust, rustlang, rust-lang, ParallelIterator"><title>ParallelIterator in rayon::iter - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../../rayon/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../rayon/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">ParallelIterator</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Item">Item</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.drive_unindexed">drive_unindexed</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.all">all</a></li><li><a href="#method.any">any</a></li><li><a href="#method.chain">chain</a></li><li><a href="#method.cloned">cloned</a></li><li><a href="#method.collect">collect</a></li><li><a href="#method.copied">copied</a></li><li><a href="#method.count">count</a></li><li><a href="#method.filter">filter</a></li><li><a href="#method.filter_map">filter_map</a></li><li><a href="#method.find_any">find_any</a></li><li><a href="#method.find_first">find_first</a></li><li><a href="#method.find_last">find_last</a></li><li><a href="#method.find_map_any">find_map_any</a></li><li><a href="#method.find_map_first">find_map_first</a></li><li><a href="#method.find_map_last">find_map_last</a></li><li><a href="#method.flat_map">flat_map</a></li><li><a href="#method.flat_map_iter">flat_map_iter</a></li><li><a href="#method.flatten">flatten</a></li><li><a href="#method.flatten_iter">flatten_iter</a></li><li><a href="#method.fold">fold</a></li><li><a href="#method.fold_with">fold_with</a></li><li><a href="#method.for_each">for_each</a></li><li><a href="#method.for_each_init">for_each_init</a></li><li><a href="#method.for_each_with">for_each_with</a></li><li><a href="#method.inspect">inspect</a></li><li><a href="#method.intersperse">intersperse</a></li><li><a href="#method.map">map</a></li><li><a href="#method.map_init">map_init</a></li><li><a href="#method.map_with">map_with</a></li><li><a href="#method.max">max</a></li><li><a href="#method.max_by">max_by</a></li><li><a href="#method.max_by_key">max_by_key</a></li><li><a href="#method.min">min</a></li><li><a href="#method.min_by">min_by</a></li><li><a href="#method.min_by_key">min_by_key</a></li><li><a href="#method.opt_len">opt_len</a></li><li><a href="#method.panic_fuse">panic_fuse</a></li><li><a href="#method.partition">partition</a></li><li><a href="#method.partition_map">partition_map</a></li><li><a href="#method.product">product</a></li><li><a href="#method.reduce">reduce</a></li><li><a href="#method.reduce_with">reduce_with</a></li><li><a href="#method.skip_any">skip_any</a></li><li><a href="#method.skip_any_while">skip_any_while</a></li><li><a href="#method.sum">sum</a></li><li><a href="#method.take_any">take_any</a></li><li><a href="#method.take_any_while">take_any_while</a></li><li><a href="#method.try_fold">try_fold</a></li><li><a href="#method.try_fold_with">try_fold_with</a></li><li><a href="#method.try_for_each">try_for_each</a></li><li><a href="#method.try_for_each_init">try_for_each_init</a></li><li><a href="#method.try_for_each_with">try_for_each_with</a></li><li><a href="#method.try_reduce">try_reduce</a></li><li><a href="#method.try_reduce_with">try_reduce_with</a></li><li><a href="#method.unzip">unzip</a></li><li><a href="#method.update">update</a></li><li><a href="#method.while_some">while_some</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In rayon::iter</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../index.html">rayon</a>::<wbr><a href="index.html">iter</a>::<wbr><a class="trait" href="#">ParallelIterator</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rayon/iter/mod.rs.html#358-2375">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait ParallelIterator: Sized + Send { |
| type <a href="#associatedtype.Item" class="associatedtype">Item</a>: Send; |
| |
| <details class="rustdoc-toggle type-contents-toggle"><summary class="hideme"><span>Show 58 methods</span></summary> fn <a href="#tymethod.drive_unindexed" class="fnname">drive_unindexed</a><C>(self, consumer: C) -> C::<a class="associatedtype" href="plumbing/trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a><br> <span class="where">where<br> C: <a class="trait" href="plumbing/trait.UnindexedConsumer.html" title="trait rayon::iter::plumbing::UnindexedConsumer">UnindexedConsumer</a><Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>></span>; |
| |
| fn <a href="#method.for_each" class="fnname">for_each</a><OP>(self, op: OP)<br> <span class="where">where<br> OP: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.for_each_with" class="fnname">for_each_with</a><OP, T>(self, init: T, op: OP)<br> <span class="where">where<br> OP: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Sync + Send,<br> T: Send + Clone</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.for_each_init" class="fnname">for_each_init</a><OP, INIT, T>(self, init: INIT, op: OP)<br> <span class="where">where<br> OP: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Sync + Send,<br> INIT: Fn() -> T + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.try_for_each" class="fnname">try_for_each</a><OP, R>(self, op: OP) -> R<br> <span class="where">where<br> OP: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> R: Try<Output = ()> + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.try_for_each_with" class="fnname">try_for_each_with</a><OP, T, R>(self, init: T, op: OP) -> R<br> <span class="where">where<br> OP: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> T: Send + Clone,<br> R: Try<Output = ()> + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.try_for_each_init" class="fnname">try_for_each_init</a><OP, INIT, T, R>(self, init: INIT, op: OP) -> R<br> <span class="where">where<br> OP: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> INIT: Fn() -> T + Sync + Send,<br> R: Try<Output = ()> + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.count" class="fnname">count</a>(self) -> usize { ... } |
| <span class="item-spacer"></span> fn <a href="#method.map" class="fnname">map</a><F, R>(self, map_op: F) -> <a class="struct" href="struct.Map.html" title="struct rayon::iter::Map">Map</a><Self, F><br> <span class="where">where<br> F: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> R: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.map_with" class="fnname">map_with</a><F, T, R>(self, init: T, map_op: F) -> <a class="struct" href="struct.MapWith.html" title="struct rayon::iter::MapWith">MapWith</a><Self, T, F><br> <span class="where">where<br> F: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> T: Send + Clone,<br> R: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.map_init" class="fnname">map_init</a><F, INIT, T, R>(<br> self,<br> init: INIT,<br> map_op: F<br> ) -> <a class="struct" href="struct.MapInit.html" title="struct rayon::iter::MapInit">MapInit</a><Self, INIT, F><br> <span class="where">where<br> F: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> INIT: Fn() -> T + Sync + Send,<br> R: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.cloned" class="fnname">cloned</a><'a, T>(self) -> <a class="struct" href="struct.Cloned.html" title="struct rayon::iter::Cloned">Cloned</a><Self><br> <span class="where">where<br> T: 'a + Clone + Send,<br> Self: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = &'a T></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.copied" class="fnname">copied</a><'a, T>(self) -> <a class="struct" href="struct.Copied.html" title="struct rayon::iter::Copied">Copied</a><Self><br> <span class="where">where<br> T: 'a + Copy + Send,<br> Self: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = &'a T></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.inspect" class="fnname">inspect</a><OP>(self, inspect_op: OP) -> <a class="struct" href="struct.Inspect.html" title="struct rayon::iter::Inspect">Inspect</a><Self, OP><br> <span class="where">where<br> OP: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.update" class="fnname">update</a><F>(self, update_op: F) -> <a class="struct" href="struct.Update.html" title="struct rayon::iter::Update">Update</a><Self, F><br> <span class="where">where<br> F: Fn(&mut Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.filter" class="fnname">filter</a><P>(self, filter_op: P) -> <a class="struct" href="struct.Filter.html" title="struct rayon::iter::Filter">Filter</a><Self, P><br> <span class="where">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.filter_map" class="fnname">filter_map</a><P, R>(self, filter_op: P) -> <a class="struct" href="struct.FilterMap.html" title="struct rayon::iter::FilterMap">FilterMap</a><Self, P><br> <span class="where">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Option<R> + Sync + Send,<br> R: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.flat_map" class="fnname">flat_map</a><F, PI>(self, map_op: F) -> <a class="struct" href="struct.FlatMap.html" title="struct rayon::iter::FlatMap">FlatMap</a><Self, F><br> <span class="where">where<br> F: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> PI + Sync + Send,<br> PI: <a class="trait" href="trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.flat_map_iter" class="fnname">flat_map_iter</a><F, SI>(self, map_op: F) -> <a class="struct" href="struct.FlatMapIter.html" title="struct rayon::iter::FlatMapIter">FlatMapIter</a><Self, F><br> <span class="where">where<br> F: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> SI + Sync + Send,<br> SI: IntoIterator,<br> SI::Item: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.flatten" class="fnname">flatten</a>(self) -> <a class="struct" href="struct.Flatten.html" title="struct rayon::iter::Flatten">Flatten</a><Self><br> <span class="where">where<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.flatten_iter" class="fnname">flatten_iter</a>(self) -> <a class="struct" href="struct.FlattenIter.html" title="struct rayon::iter::FlattenIter">FlattenIter</a><Self><br> <span class="where">where<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: IntoIterator,<br> <Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> as IntoIterator>::Item: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.reduce" class="fnname">reduce</a><OP, ID>(self, identity: ID, op: OP) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a><br> <span class="where">where<br> OP: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> + Sync + Send,<br> ID: Fn() -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.reduce_with" class="fnname">reduce_with</a><OP>(self, op: OP) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><br> <span class="where">where<br> OP: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.try_reduce" class="fnname">try_reduce</a><T, OP, ID>(self, identity: ID, op: OP) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a><br> <span class="where">where<br> OP: Fn(T, T) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> + Sync + Send,<br> ID: Fn() -> T + Sync + Send,<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: Try<Output = T></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.try_reduce_with" class="fnname">try_reduce_with</a><T, OP>(self, op: OP) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><br> <span class="where">where<br> OP: Fn(T, T) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> + Sync + Send,<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: Try<Output = T></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.fold" class="fnname">fold</a><T, ID, F>(self, identity: ID, fold_op: F) -> <a class="struct" href="struct.Fold.html" title="struct rayon::iter::Fold">Fold</a><Self, ID, F><br> <span class="where">where<br> F: Fn(T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> T + Sync + Send,<br> ID: Fn() -> T + Sync + Send,<br> T: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.fold_with" class="fnname">fold_with</a><F, T>(self, init: T, fold_op: F) -> <a class="struct" href="struct.FoldWith.html" title="struct rayon::iter::FoldWith">FoldWith</a><Self, T, F><br> <span class="where">where<br> F: Fn(T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> T + Sync + Send,<br> T: Send + Clone</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.try_fold" class="fnname">try_fold</a><T, R, ID, F>(<br> self,<br> identity: ID,<br> fold_op: F<br> ) -> <a class="struct" href="struct.TryFold.html" title="struct rayon::iter::TryFold">TryFold</a><Self, R, ID, F><br> <span class="where">where<br> F: Fn(T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> ID: Fn() -> T + Sync + Send,<br> R: Try<Output = T> + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.try_fold_with" class="fnname">try_fold_with</a><F, T, R>(<br> self,<br> init: T,<br> fold_op: F<br> ) -> <a class="struct" href="struct.TryFoldWith.html" title="struct rayon::iter::TryFoldWith">TryFoldWith</a><Self, R, F><br> <span class="where">where<br> F: Fn(T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> R: Try<Output = T> + Send,<br> T: Clone + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.sum" class="fnname">sum</a><S>(self) -> S<br> <span class="where">where<br> S: Send + Sum<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>> + Sum<S></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.product" class="fnname">product</a><P>(self) -> P<br> <span class="where">where<br> P: Send + Product<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>> + Product<P></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.min" class="fnname">min</a>(self) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><br> <span class="where">where<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: Ord</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.min_by" class="fnname">min_by</a><F>(self, f: F) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><br> <span class="where">where<br> F: Sync + Send + Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, &Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Ordering</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.min_by_key" class="fnname">min_by_key</a><K, F>(self, f: F) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><br> <span class="where">where<br> K: Ord + Send,<br> F: Sync + Send + Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> K</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.max" class="fnname">max</a>(self) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><br> <span class="where">where<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: Ord</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.max_by" class="fnname">max_by</a><F>(self, f: F) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><br> <span class="where">where<br> F: Sync + Send + Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, &Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Ordering</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.max_by_key" class="fnname">max_by_key</a><K, F>(self, f: F) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><br> <span class="where">where<br> K: Ord + Send,<br> F: Sync + Send + Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> K</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.chain" class="fnname">chain</a><C>(self, chain: C) -> <a class="struct" href="struct.Chain.html" title="struct rayon::iter::Chain">Chain</a><Self, C::<a class="associatedtype" href="trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>><br> <span class="where">where<br> C: <a class="trait" href="trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a><Item = Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.find_any" class="fnname">find_any</a><P>(self, predicate: P) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><br> <span class="where">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.find_first" class="fnname">find_first</a><P>(self, predicate: P) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><br> <span class="where">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.find_last" class="fnname">find_last</a><P>(self, predicate: P) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><br> <span class="where">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.find_map_any" class="fnname">find_map_any</a><P, R>(self, predicate: P) -> Option<R><br> <span class="where">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Option<R> + Sync + Send,<br> R: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.find_map_first" class="fnname">find_map_first</a><P, R>(self, predicate: P) -> Option<R><br> <span class="where">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Option<R> + Sync + Send,<br> R: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.find_map_last" class="fnname">find_map_last</a><P, R>(self, predicate: P) -> Option<R><br> <span class="where">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Option<R> + Sync + Send,<br> R: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.any" class="fnname">any</a><P>(self, predicate: P) -> bool<br> <span class="where">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.all" class="fnname">all</a><P>(self, predicate: P) -> bool<br> <span class="where">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.while_some" class="fnname">while_some</a><T>(self) -> <a class="struct" href="struct.WhileSome.html" title="struct rayon::iter::WhileSome">WhileSome</a><Self><br> <span class="where">where<br> Self: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = Option<T>>,<br> T: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.panic_fuse" class="fnname">panic_fuse</a>(self) -> <a class="struct" href="struct.PanicFuse.html" title="struct rayon::iter::PanicFuse">PanicFuse</a><Self> { ... } |
| <span class="item-spacer"></span> fn <a href="#method.collect" class="fnname">collect</a><C>(self) -> C<br> <span class="where">where<br> C: <a class="trait" href="trait.FromParallelIterator.html" title="trait rayon::iter::FromParallelIterator">FromParallelIterator</a><Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>></span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.unzip" class="fnname">unzip</a><A, B, FromA, FromB>(self) -> (FromA, FromB)<br> <span class="where">where<br> Self: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = (A, B)>,<br> FromA: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><A>,<br> FromB: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><B>,<br> A: Send,<br> B: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.partition" class="fnname">partition</a><A, B, P>(self, predicate: P) -> (A, B)<br> <span class="where">where<br> A: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,<br> B: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.partition_map" class="fnname">partition_map</a><A, B, P, L, R>(self, predicate: P) -> (A, B)<br> <span class="where">where<br> A: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><L>,<br> B: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><R>,<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> <a class="enum" href="enum.Either.html" title="enum rayon::iter::Either">Either</a><L, R> + Sync + Send,<br> L: Send,<br> R: Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.intersperse" class="fnname">intersperse</a>(self, element: Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> <a class="struct" href="struct.Intersperse.html" title="struct rayon::iter::Intersperse">Intersperse</a><Self><br> <span class="where">where<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: Clone</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.take_any" class="fnname">take_any</a>(self, n: usize) -> <a class="struct" href="struct.TakeAny.html" title="struct rayon::iter::TakeAny">TakeAny</a><Self> { ... } |
| <span class="item-spacer"></span> fn <a href="#method.skip_any" class="fnname">skip_any</a>(self, n: usize) -> <a class="struct" href="struct.SkipAny.html" title="struct rayon::iter::SkipAny">SkipAny</a><Self> { ... } |
| <span class="item-spacer"></span> fn <a href="#method.take_any_while" class="fnname">take_any_while</a><P>(self, predicate: P) -> <a class="struct" href="struct.TakeAnyWhile.html" title="struct rayon::iter::TakeAnyWhile">TakeAnyWhile</a><Self, P><br> <span class="where">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.skip_any_while" class="fnname">skip_any_while</a><P>(self, predicate: P) -> <a class="struct" href="struct.SkipAnyWhile.html" title="struct rayon::iter::SkipAnyWhile">SkipAnyWhile</a><Self, P><br> <span class="where">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send</span>, |
| { ... } |
| <span class="item-spacer"></span> fn <a href="#method.opt_len" class="fnname">opt_len</a>(&self) -> Option<usize> { ... } |
| </details>}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Parallel version of the standard iterator trait.</p> |
| <p>The combinators on this trait are available on <strong>all</strong> parallel |
| iterators. Additional methods can be found on the |
| <a href="trait.IndexedParallelIterator.html"><code>IndexedParallelIterator</code></a> trait: those methods are only |
| available for parallel iterators where the number of items is |
| known in advance (so, e.g., after invoking <code>filter</code>, those methods |
| become unavailable).</p> |
| <p>For examples of using parallel iterators, see <a href="index.html">the docs on the |
| <code>iter</code> module</a>.</p> |
| </div></details><h2 id="required-associated-types" class="small-section-header">Required Associated Types<a href="#required-associated-types" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="associatedtype.Item" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#364">source</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a>: Send</h4></section></summary><div class="docblock"><p>The type of item that this parallel iterator produces. |
| For example, if you use the <a href="#method.for_each"><code>for_each</code></a> method, this is the type of |
| item that your closure will be invoked with.</p> |
| </div></details></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.drive_unindexed" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#2354-2356">source</a><h4 class="code-header">fn <a href="#tymethod.drive_unindexed" class="fnname">drive_unindexed</a><C>(self, consumer: C) -> C::<a class="associatedtype" href="plumbing/trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a><span class="where fmt-newline">where<br> C: <a class="trait" href="plumbing/trait.UnindexedConsumer.html" title="trait rayon::iter::plumbing::UnindexedConsumer">UnindexedConsumer</a><Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,</span></h4></section></summary><div class="docblock"><p>Internal method used to define the behavior of this parallel |
| iterator. You should not need to call this directly.</p> |
| <p>This method causes the iterator <code>self</code> to start producing |
| items and to feed them to the consumer <code>consumer</code> one by one. |
| It may split the consumer before doing so to create the |
| opportunity to produce in parallel.</p> |
| <p>See the <a href="https://github.com/rayon-rs/rayon/blob/master/src/iter/plumbing/README.md">README</a> for more details on the internals of parallel |
| iterators.</p> |
| </div></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.for_each" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#375-380">source</a><h4 class="code-header">fn <a href="#method.for_each" class="fnname">for_each</a><OP>(self, op: OP)<span class="where fmt-newline">where<br> OP: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Executes <code>OP</code> on each item produced by the iterator, in parallel.</p> |
| <h5 id="examples"><a href="#examples">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| (<span class="number">0</span>..<span class="number">100</span>).into_par_iter().for_each(|x| <span class="macro">println!</span>(<span class="string">"{:?}"</span>, x));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.for_each_with" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#405-411">source</a><h4 class="code-header">fn <a href="#method.for_each_with" class="fnname">for_each_with</a><OP, T>(self, init: T, op: OP)<span class="where fmt-newline">where<br> OP: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Sync + Send,<br> T: Send + Clone,</span></h4></section></summary><div class="docblock"><p>Executes <code>OP</code> on the given <code>init</code> value with each item produced by |
| the iterator, in parallel.</p> |
| <p>The <code>init</code> value will be cloned only as needed to be paired with |
| the group of items in each rayon job. It does not require the type |
| to be <code>Sync</code>.</p> |
| <h5 id="examples-1"><a href="#examples-1">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::sync::mpsc::channel; |
| <span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>(sender, receiver) = channel(); |
| |
| (<span class="number">0</span>..<span class="number">5</span>).into_par_iter().for_each_with(sender, |s, x| s.send(x).unwrap()); |
| |
| <span class="kw">let </span><span class="kw-2">mut </span>res: Vec<<span class="kw">_</span>> = receiver.iter().collect(); |
| |
| res.sort(); |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>res[..], <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>])</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.for_each_init" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#439-445">source</a><h4 class="code-header">fn <a href="#method.for_each_init" class="fnname">for_each_init</a><OP, INIT, T>(self, init: INIT, op: OP)<span class="where fmt-newline">where<br> OP: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Sync + Send,<br> INIT: Fn() -> T + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Executes <code>OP</code> on a value returned by <code>init</code> with each item produced by |
| the iterator, in parallel.</p> |
| <p>The <code>init</code> function will be called only as needed for a value to be |
| paired with the group of items in each rayon job. There is no |
| constraint on that returned type at all!</p> |
| <h5 id="examples-2"><a href="#examples-2">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::Rng; |
| <span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span><span class="kw-2">mut </span>v = <span class="macro">vec!</span>[<span class="number">0u8</span>; <span class="number">1_000_000</span>]; |
| |
| v.par_chunks_mut(<span class="number">1000</span>) |
| .for_each_init( |
| || rand::thread_rng(), |
| |rng, chunk| rng.fill(chunk), |
| ); |
| |
| <span class="comment">// There's a remote chance that this will fail... |
| </span><span class="kw">for </span>i <span class="kw">in </span><span class="number">0u8</span>..=<span class="number">255 </span>{ |
| <span class="macro">assert!</span>(v.contains(<span class="kw-2">&</span>i)); |
| }</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_for_each" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#467-477">source</a><h4 class="code-header">fn <a href="#method.try_for_each" class="fnname">try_for_each</a><OP, R>(self, op: OP) -> R<span class="where fmt-newline">where<br> OP: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> R: Try<Output = ()> + Send,</span></h4></section></summary><div class="docblock"><p>Executes a fallible <code>OP</code> on each item produced by the iterator, in parallel.</p> |
| <p>If the <code>OP</code> returns <code>Result::Err</code> or <code>Option::None</code>, we will attempt to |
| stop processing the rest of the items in the iterator as soon as |
| possible, and we will return that terminating value. Otherwise, we will |
| return an empty <code>Result::Ok(())</code> or <code>Option::Some(())</code>. If there are |
| multiple errors in parallel, it is not specified which will be returned.</p> |
| <h5 id="examples-3"><a href="#examples-3">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">use </span>std::io::{<span class="self">self</span>, Write}; |
| |
| <span class="comment">// This will stop iteration early if there's any write error, like |
| // having piped output get closed on the other end. |
| </span>(<span class="number">0</span>..<span class="number">100</span>).into_par_iter() |
| .try_for_each(|x| <span class="macro">writeln!</span>(io::stdout(), <span class="string">"{:?}"</span>, x)) |
| .expect(<span class="string">"expected no write errors"</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_for_each_with" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#506-517">source</a><h4 class="code-header">fn <a href="#method.try_for_each_with" class="fnname">try_for_each_with</a><OP, T, R>(self, init: T, op: OP) -> R<span class="where fmt-newline">where<br> OP: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> T: Send + Clone,<br> R: Try<Output = ()> + Send,</span></h4></section></summary><div class="docblock"><p>Executes a fallible <code>OP</code> on the given <code>init</code> value with each item |
| produced by the iterator, in parallel.</p> |
| <p>This combines the <code>init</code> semantics of <a href="#method.for_each_with"><code>for_each_with()</code></a> and the |
| failure semantics of <a href="#method.try_for_each"><code>try_for_each()</code></a>.</p> |
| <h5 id="examples-4"><a href="#examples-4">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::sync::mpsc::channel; |
| <span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>(sender, receiver) = channel(); |
| |
| (<span class="number">0</span>..<span class="number">5</span>).into_par_iter() |
| .try_for_each_with(sender, |s, x| s.send(x)) |
| .expect(<span class="string">"expected no send errors"</span>); |
| |
| <span class="kw">let </span><span class="kw-2">mut </span>res: Vec<<span class="kw">_</span>> = receiver.iter().collect(); |
| |
| res.sort(); |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>res[..], <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>])</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_for_each_init" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#548-559">source</a><h4 class="code-header">fn <a href="#method.try_for_each_init" class="fnname">try_for_each_init</a><OP, INIT, T, R>(self, init: INIT, op: OP) -> R<span class="where fmt-newline">where<br> OP: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> INIT: Fn() -> T + Sync + Send,<br> R: Try<Output = ()> + Send,</span></h4></section></summary><div class="docblock"><p>Executes a fallible <code>OP</code> on a value returned by <code>init</code> with each item |
| produced by the iterator, in parallel.</p> |
| <p>This combines the <code>init</code> semantics of <a href="#method.for_each_init"><code>for_each_init()</code></a> and the |
| failure semantics of <a href="#method.try_for_each"><code>try_for_each()</code></a>.</p> |
| <h5 id="examples-5"><a href="#examples-5">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::Rng; |
| <span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span><span class="kw-2">mut </span>v = <span class="macro">vec!</span>[<span class="number">0u8</span>; <span class="number">1_000_000</span>]; |
| |
| v.par_chunks_mut(<span class="number">1000</span>) |
| .try_for_each_init( |
| || rand::thread_rng(), |
| |rng, chunk| rng.try_fill(chunk), |
| ) |
| .expect(<span class="string">"expected no rand errors"</span>); |
| |
| <span class="comment">// There's a remote chance that this will fail... |
| </span><span class="kw">for </span>i <span class="kw">in </span><span class="number">0u8</span>..=<span class="number">255 </span>{ |
| <span class="macro">assert!</span>(v.contains(<span class="kw-2">&</span>i)); |
| }</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.count" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#572-578">source</a><h4 class="code-header">fn <a href="#method.count" class="fnname">count</a>(self) -> usize</h4></section></summary><div class="docblock"><p>Counts the number of items in this parallel iterator.</p> |
| <h5 id="examples-6"><a href="#examples-6">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>count = (<span class="number">0</span>..<span class="number">100</span>).into_par_iter().count(); |
| |
| <span class="macro">assert_eq!</span>(count, <span class="number">100</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#594-600">source</a><h4 class="code-header">fn <a href="#method.map" class="fnname">map</a><F, R>(self, map_op: F) -> <a class="struct" href="struct.Map.html" title="struct rayon::iter::Map">Map</a><Self, F><span class="where fmt-newline">where<br> F: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> R: Send,</span></h4></section></summary><div class="docblock"><p>Applies <code>map_op</code> to each item of this iterator, producing a new |
| iterator with the results.</p> |
| <h5 id="examples-7"><a href="#examples-7">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span><span class="kw-2">mut </span>par_iter = (<span class="number">0</span>..<span class="number">5</span>).into_par_iter().map(|x| x * <span class="number">2</span>); |
| |
| <span class="kw">let </span>doubles: Vec<<span class="kw">_</span>> = par_iter.collect(); |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>doubles[..], <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">2</span>, <span class="number">4</span>, <span class="number">6</span>, <span class="number">8</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map_with" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#631-638">source</a><h4 class="code-header">fn <a href="#method.map_with" class="fnname">map_with</a><F, T, R>(self, init: T, map_op: F) -> <a class="struct" href="struct.MapWith.html" title="struct rayon::iter::MapWith">MapWith</a><Self, T, F><span class="where fmt-newline">where<br> F: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> T: Send + Clone,<br> R: Send,</span></h4></section></summary><div class="docblock"><p>Applies <code>map_op</code> to the given <code>init</code> value with each item of this |
| iterator, producing a new iterator with the results.</p> |
| <p>The <code>init</code> value will be cloned only as needed to be paired with |
| the group of items in each rayon job. It does not require the type |
| to be <code>Sync</code>.</p> |
| <h5 id="examples-8"><a href="#examples-8">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::sync::mpsc::channel; |
| <span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>(sender, receiver) = channel(); |
| |
| <span class="kw">let </span>a: Vec<<span class="kw">_</span>> = (<span class="number">0</span>..<span class="number">5</span>) |
| .into_par_iter() <span class="comment">// iterating over i32 |
| </span>.map_with(sender, |s, x| { |
| s.send(x).unwrap(); <span class="comment">// sending i32 values through the channel |
| </span>x <span class="comment">// returning i32 |
| </span>}) |
| .collect(); <span class="comment">// collecting the returned values into a vector |
| |
| </span><span class="kw">let </span><span class="kw-2">mut </span>b: Vec<<span class="kw">_</span>> = receiver.iter() <span class="comment">// iterating over the values in the channel |
| </span>.collect(); <span class="comment">// and collecting them |
| </span>b.sort(); |
| |
| <span class="macro">assert_eq!</span>(a, b);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map_init" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#668-675">source</a><h4 class="code-header">fn <a href="#method.map_init" class="fnname">map_init</a><F, INIT, T, R>(self, init: INIT, map_op: F) -> <a class="struct" href="struct.MapInit.html" title="struct rayon::iter::MapInit">MapInit</a><Self, INIT, F><span class="where fmt-newline">where<br> F: Fn(&mut T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> INIT: Fn() -> T + Sync + Send,<br> R: Send,</span></h4></section></summary><div class="docblock"><p>Applies <code>map_op</code> to a value returned by <code>init</code> with each item of this |
| iterator, producing a new iterator with the results.</p> |
| <p>The <code>init</code> function will be called only as needed for a value to be |
| paired with the group of items in each rayon job. There is no |
| constraint on that returned type at all!</p> |
| <h5 id="examples-9"><a href="#examples-9">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::Rng; |
| <span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a: Vec<<span class="kw">_</span>> = (<span class="number">1i32</span>..<span class="number">1_000_000</span>) |
| .into_par_iter() |
| .map_init( |
| || rand::thread_rng(), <span class="comment">// get the thread-local RNG |
| </span>|rng, x| <span class="kw">if </span>rng.gen() { <span class="comment">// randomly negate items |
| </span>-x |
| } <span class="kw">else </span>{ |
| x |
| }, |
| ).collect(); |
| |
| <span class="comment">// There's a remote chance that this will fail... |
| </span><span class="macro">assert!</span>(a.iter().any(|<span class="kw-2">&</span>x| x < <span class="number">0</span>)); |
| <span class="macro">assert!</span>(a.iter().any(|<span class="kw-2">&</span>x| x > <span class="number">0</span>));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cloned" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#698-704">source</a><h4 class="code-header">fn <a href="#method.cloned" class="fnname">cloned</a><'a, T>(self) -> <a class="struct" href="struct.Cloned.html" title="struct rayon::iter::Cloned">Cloned</a><Self><span class="where fmt-newline">where<br> T: 'a + Clone + Send,<br> Self: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = &'a T>,</span></h4></section></summary><div class="docblock"><p>Creates an iterator which clones all of its elements. This may be |
| useful when you have an iterator over <code>&T</code>, but you need <code>T</code>, and |
| that type implements <code>Clone</code>. See also <a href="#method.copied"><code>copied()</code></a>.</p> |
| <h5 id="examples-10"><a href="#examples-10">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; |
| |
| <span class="kw">let </span>v_cloned: Vec<<span class="kw">_</span>> = a.par_iter().cloned().collect(); |
| |
| <span class="comment">// cloned is the same as .map(|&x| x), for integers |
| </span><span class="kw">let </span>v_map: Vec<<span class="kw">_</span>> = a.par_iter().map(|<span class="kw-2">&</span>x| x).collect(); |
| |
| <span class="macro">assert_eq!</span>(v_cloned, <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]); |
| <span class="macro">assert_eq!</span>(v_map, <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copied" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#727-733">source</a><h4 class="code-header">fn <a href="#method.copied" class="fnname">copied</a><'a, T>(self) -> <a class="struct" href="struct.Copied.html" title="struct rayon::iter::Copied">Copied</a><Self><span class="where fmt-newline">where<br> T: 'a + Copy + Send,<br> Self: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = &'a T>,</span></h4></section></summary><div class="docblock"><p>Creates an iterator which copies all of its elements. This may be |
| useful when you have an iterator over <code>&T</code>, but you need <code>T</code>, and |
| that type implements <code>Copy</code>. See also <a href="#method.cloned"><code>cloned()</code></a>.</p> |
| <h5 id="examples-11"><a href="#examples-11">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; |
| |
| <span class="kw">let </span>v_copied: Vec<<span class="kw">_</span>> = a.par_iter().copied().collect(); |
| |
| <span class="comment">// copied is the same as .map(|&x| x), for integers |
| </span><span class="kw">let </span>v_map: Vec<<span class="kw">_</span>> = a.par_iter().map(|<span class="kw-2">&</span>x| x).collect(); |
| |
| <span class="macro">assert_eq!</span>(v_copied, <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]); |
| <span class="macro">assert_eq!</span>(v_map, <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.inspect" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#764-769">source</a><h4 class="code-header">fn <a href="#method.inspect" class="fnname">inspect</a><OP>(self, inspect_op: OP) -> <a class="struct" href="struct.Inspect.html" title="struct rayon::iter::Inspect">Inspect</a><Self, OP><span class="where fmt-newline">where<br> OP: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Applies <code>inspect_op</code> to a reference to each item of this iterator, |
| producing a new iterator passing through the original items. This is |
| often useful for debugging to see what’s happening in iterator stages.</p> |
| <h5 id="examples-12"><a href="#examples-12">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>, <span class="number">3</span>]; |
| |
| <span class="comment">// this iterator sequence is complex. |
| </span><span class="kw">let </span>sum = a.par_iter() |
| .cloned() |
| .filter(|<span class="kw-2">&</span>x| x % <span class="number">2 </span>== <span class="number">0</span>) |
| .reduce(|| <span class="number">0</span>, |sum, i| sum + i); |
| |
| <span class="macro">println!</span>(<span class="string">"{}"</span>, sum); |
| |
| <span class="comment">// let's add some inspect() calls to investigate what's happening |
| </span><span class="kw">let </span>sum = a.par_iter() |
| .cloned() |
| .inspect(|x| <span class="macro">println!</span>(<span class="string">"about to filter: {}"</span>, x)) |
| .filter(|<span class="kw-2">&</span>x| x % <span class="number">2 </span>== <span class="number">0</span>) |
| .inspect(|x| <span class="macro">println!</span>(<span class="string">"made it through filter: {}"</span>, x)) |
| .reduce(|| <span class="number">0</span>, |sum, i| sum + i); |
| |
| <span class="macro">println!</span>(<span class="string">"{}"</span>, sum);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.update" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#784-789">source</a><h4 class="code-header">fn <a href="#method.update" class="fnname">update</a><F>(self, update_op: F) -> <a class="struct" href="struct.Update.html" title="struct rayon::iter::Update">Update</a><Self, F><span class="where fmt-newline">where<br> F: Fn(&mut Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Mutates each item of this iterator before yielding it.</p> |
| <h5 id="examples-13"><a href="#examples-13">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>par_iter = (<span class="number">0</span>..<span class="number">5</span>).into_par_iter().update(|x| {<span class="kw-2">*</span>x <span class="kw-2">*</span>= <span class="number">2</span>;}); |
| |
| <span class="kw">let </span>doubles: Vec<<span class="kw">_</span>> = par_iter.collect(); |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>doubles[..], <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">2</span>, <span class="number">4</span>, <span class="number">6</span>, <span class="number">8</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.filter" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#805-810">source</a><h4 class="code-header">fn <a href="#method.filter" class="fnname">filter</a><P>(self, filter_op: P) -> <a class="struct" href="struct.Filter.html" title="struct rayon::iter::Filter">Filter</a><Self, P><span class="where fmt-newline">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Applies <code>filter_op</code> to each item of this iterator, producing a new |
| iterator with only the items that gave <code>true</code> results.</p> |
| <h5 id="examples-14"><a href="#examples-14">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span><span class="kw-2">mut </span>par_iter = (<span class="number">0</span>..<span class="number">10</span>).into_par_iter().filter(|x| x % <span class="number">2 </span>== <span class="number">0</span>); |
| |
| <span class="kw">let </span>even_numbers: Vec<<span class="kw">_</span>> = par_iter.collect(); |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>even_numbers[..], <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">2</span>, <span class="number">4</span>, <span class="number">6</span>, <span class="number">8</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.filter_map" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#830-836">source</a><h4 class="code-header">fn <a href="#method.filter_map" class="fnname">filter_map</a><P, R>(self, filter_op: P) -> <a class="struct" href="struct.FilterMap.html" title="struct rayon::iter::FilterMap">FilterMap</a><Self, P><span class="where fmt-newline">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Option<R> + Sync + Send,<br> R: Send,</span></h4></section></summary><div class="docblock"><p>Applies <code>filter_op</code> to each item of this iterator to get an <code>Option</code>, |
| producing a new iterator with only the items from <code>Some</code> results.</p> |
| <h5 id="examples-15"><a href="#examples-15">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span><span class="kw-2">mut </span>par_iter = (<span class="number">0</span>..<span class="number">10</span>).into_par_iter() |
| .filter_map(|x| { |
| <span class="kw">if </span>x % <span class="number">2 </span>== <span class="number">0 </span>{ <span class="prelude-val">Some</span>(x * <span class="number">3</span>) } |
| <span class="kw">else </span>{ <span class="prelude-val">None </span>} |
| }); |
| |
| <span class="kw">let </span>even_numbers: Vec<<span class="kw">_</span>> = par_iter.collect(); |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>even_numbers[..], <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">6</span>, <span class="number">12</span>, <span class="number">18</span>, <span class="number">24</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flat_map" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#856-862">source</a><h4 class="code-header">fn <a href="#method.flat_map" class="fnname">flat_map</a><F, PI>(self, map_op: F) -> <a class="struct" href="struct.FlatMap.html" title="struct rayon::iter::FlatMap">FlatMap</a><Self, F><span class="where fmt-newline">where<br> F: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> PI + Sync + Send,<br> PI: <a class="trait" href="trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,</span></h4></section></summary><div class="docblock"><p>Applies <code>map_op</code> to each item of this iterator to get nested parallel iterators, |
| producing a new parallel iterator that flattens these back into one.</p> |
| <p>See also <a href="#method.flat_map_iter"><code>flat_map_iter</code></a>.</p> |
| <h5 id="examples-16"><a href="#examples-16">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>], [<span class="number">5</span>, <span class="number">6</span>], [<span class="number">7</span>, <span class="number">8</span>]]; |
| |
| <span class="kw">let </span>par_iter = a.par_iter().cloned().flat_map(|a| a.to_vec()); |
| |
| <span class="kw">let </span>vec: Vec<<span class="kw">_</span>> = par_iter.collect(); |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>vec[..], <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>, <span class="number">8</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flat_map_iter" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#902-909">source</a><h4 class="code-header">fn <a href="#method.flat_map_iter" class="fnname">flat_map_iter</a><F, SI>(self, map_op: F) -> <a class="struct" href="struct.FlatMapIter.html" title="struct rayon::iter::FlatMapIter">FlatMapIter</a><Self, F><span class="where fmt-newline">where<br> F: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> SI + Sync + Send,<br> SI: IntoIterator,<br> SI::Item: Send,</span></h4></section></summary><div class="docblock"><p>Applies <code>map_op</code> to each item of this iterator to get nested serial iterators, |
| producing a new parallel iterator that flattens these back into one.</p> |
| <h5 id="flat_map_iter-versus-flat_map"><a href="#flat_map_iter-versus-flat_map"><code>flat_map_iter</code> versus <code>flat_map</code></a></h5> |
| <p>These two methods are similar but behave slightly differently. With <a href="#method.flat_map"><code>flat_map</code></a>, |
| each of the nested iterators must be a parallel iterator, and they will be further |
| split up with nested parallelism. With <code>flat_map_iter</code>, each nested iterator is a |
| sequential <code>Iterator</code>, and we only parallelize <em>between</em> them, while the items |
| produced by each nested iterator are processed sequentially.</p> |
| <p>When choosing between these methods, consider whether nested parallelism suits the |
| potential iterators at hand. If there’s little computation involved, or its length |
| is much less than the outer parallel iterator, then it may perform better to avoid |
| the overhead of parallelism, just flattening sequentially with <code>flat_map_iter</code>. |
| If there is a lot of computation, potentially outweighing the outer parallel |
| iterator, then the nested parallelism of <code>flat_map</code> may be worthwhile.</p> |
| <h5 id="examples-17"><a href="#examples-17">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">use </span>std::cell::RefCell; |
| |
| <span class="kw">let </span>a = [[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>], [<span class="number">5</span>, <span class="number">6</span>], [<span class="number">7</span>, <span class="number">8</span>]]; |
| |
| <span class="kw">let </span>par_iter = a.par_iter().flat_map_iter(|a| { |
| <span class="comment">// The serial iterator doesn't have to be thread-safe, just its items. |
| </span><span class="kw">let </span>cell_iter = RefCell::new(a.iter().cloned()); |
| std::iter::from_fn(<span class="kw">move </span>|| cell_iter.borrow_mut().next()) |
| }); |
| |
| <span class="kw">let </span>vec: Vec<<span class="kw">_</span>> = par_iter.collect(); |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>vec[..], <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>, <span class="number">8</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flatten" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#925-930">source</a><h4 class="code-header">fn <a href="#method.flatten" class="fnname">flatten</a>(self) -> <a class="struct" href="struct.Flatten.html" title="struct rayon::iter::Flatten">Flatten</a><Self><span class="where fmt-newline">where<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,</span></h4></section></summary><div class="docblock"><p>An adaptor that flattens parallel-iterable <code>Item</code>s into one large iterator.</p> |
| <p>See also <a href="#method.flatten_iter"><code>flatten_iter</code></a>.</p> |
| <h5 id="examples-18"><a href="#examples-18">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>x: Vec<Vec<<span class="kw">_</span>>> = <span class="macro">vec!</span>[<span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>], <span class="macro">vec!</span>[<span class="number">3</span>, <span class="number">4</span>]]; |
| <span class="kw">let </span>y: Vec<<span class="kw">_</span>> = x.into_par_iter().flatten().collect(); |
| |
| <span class="macro">assert_eq!</span>(y, <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flatten_iter" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#948-954">source</a><h4 class="code-header">fn <a href="#method.flatten_iter" class="fnname">flatten_iter</a>(self) -> <a class="struct" href="struct.FlattenIter.html" title="struct rayon::iter::FlattenIter">FlattenIter</a><Self><span class="where fmt-newline">where<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: IntoIterator,<br> <Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> as IntoIterator>::Item: Send,</span></h4></section></summary><div class="docblock"><p>An adaptor that flattens serial-iterable <code>Item</code>s into one large iterator.</p> |
| <p>See also <a href="#method.flatten"><code>flatten</code></a> and the analogous comparison of |
| <a href="#flat_map_iter-versus-flat_map"><code>flat_map_iter</code> versus <code>flat_map</code></a>.</p> |
| <h5 id="examples-19"><a href="#examples-19">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>x: Vec<Vec<<span class="kw">_</span>>> = <span class="macro">vec!</span>[<span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>], <span class="macro">vec!</span>[<span class="number">3</span>, <span class="number">4</span>]]; |
| <span class="kw">let </span>iters: Vec<<span class="kw">_</span>> = x.into_iter().map(Vec::into_iter).collect(); |
| <span class="kw">let </span>y: Vec<<span class="kw">_</span>> = iters.into_par_iter().flatten_iter().collect(); |
| |
| <span class="macro">assert_eq!</span>(y, <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reduce" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#986-992">source</a><h4 class="code-header">fn <a href="#method.reduce" class="fnname">reduce</a><OP, ID>(self, identity: ID, op: OP) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a><span class="where fmt-newline">where<br> OP: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> + Sync + Send,<br> ID: Fn() -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Reduces the items in the iterator into one item using <code>op</code>. |
| The argument <code>identity</code> should be a closure that can produce |
| “identity” value which may be inserted into the sequence as |
| needed to create opportunities for parallel execution. So, for |
| example, if you are doing a summation, then <code>identity()</code> ought |
| to produce something that represents the zero for your type |
| (but consider just calling <code>sum()</code> in that case).</p> |
| <h5 id="examples-20"><a href="#examples-20">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Iterate over a sequence of pairs `(x0, y0), ..., (xN, yN)` |
| // and use reduce to compute one pair `(x0 + ... + xN, y0 + ... + yN)` |
| // where the first/second elements are summed separately. |
| </span><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">let </span>sums = [(<span class="number">0</span>, <span class="number">1</span>), (<span class="number">5</span>, <span class="number">6</span>), (<span class="number">16</span>, <span class="number">2</span>), (<span class="number">8</span>, <span class="number">9</span>)] |
| .par_iter() <span class="comment">// iterating over &(i32, i32) |
| </span>.cloned() <span class="comment">// iterating over (i32, i32) |
| </span>.reduce(|| (<span class="number">0</span>, <span class="number">0</span>), <span class="comment">// the "identity" is 0 in both columns |
| </span>|a, b| (a.<span class="number">0 </span>+ b.<span class="number">0</span>, a.<span class="number">1 </span>+ b.<span class="number">1</span>)); |
| <span class="macro">assert_eq!</span>(sums, (<span class="number">0 </span>+ <span class="number">5 </span>+ <span class="number">16 </span>+ <span class="number">8</span>, <span class="number">1 </span>+ <span class="number">6 </span>+ <span class="number">2 </span>+ <span class="number">9</span>));</code></pre></div> |
| <p><strong>Note:</strong> unlike a sequential <code>fold</code> operation, the order in |
| which <code>op</code> will be applied to reduce the result is not fully |
| specified. So <code>op</code> should be <a href="https://en.wikipedia.org/wiki/Associative_property">associative</a> or else the results |
| will be non-deterministic. And of course <code>identity()</code> should |
| produce a true identity.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reduce_with" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1020-1041">source</a><h4 class="code-header">fn <a href="#method.reduce_with" class="fnname">reduce_with</a><OP>(self, op: OP) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><span class="where fmt-newline">where<br> OP: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Reduces the items in the iterator into one item using <code>op</code>. |
| If the iterator is empty, <code>None</code> is returned; otherwise, |
| <code>Some</code> is returned.</p> |
| <p>This version of <code>reduce</code> is simple but somewhat less |
| efficient. If possible, it is better to call <code>reduce()</code>, which |
| requires an identity element.</p> |
| <h5 id="examples-21"><a href="#examples-21">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">let </span>sums = [(<span class="number">0</span>, <span class="number">1</span>), (<span class="number">5</span>, <span class="number">6</span>), (<span class="number">16</span>, <span class="number">2</span>), (<span class="number">8</span>, <span class="number">9</span>)] |
| .par_iter() <span class="comment">// iterating over &(i32, i32) |
| </span>.cloned() <span class="comment">// iterating over (i32, i32) |
| </span>.reduce_with(|a, b| (a.<span class="number">0 </span>+ b.<span class="number">0</span>, a.<span class="number">1 </span>+ b.<span class="number">1</span>)) |
| .unwrap(); |
| <span class="macro">assert_eq!</span>(sums, (<span class="number">0 </span>+ <span class="number">5 </span>+ <span class="number">16 </span>+ <span class="number">8</span>, <span class="number">1 </span>+ <span class="number">6 </span>+ <span class="number">2 </span>+ <span class="number">9</span>));</code></pre></div> |
| <p><strong>Note:</strong> unlike a sequential <code>fold</code> operation, the order in |
| which <code>op</code> will be applied to reduce the result is not fully |
| specified. So <code>op</code> should be <a href="https://en.wikipedia.org/wiki/Associative_property">associative</a> or else the results |
| will be non-deterministic.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_reduce" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1074-1081">source</a><h4 class="code-header">fn <a href="#method.try_reduce" class="fnname">try_reduce</a><T, OP, ID>(self, identity: ID, op: OP) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a><span class="where fmt-newline">where<br> OP: Fn(T, T) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> + Sync + Send,<br> ID: Fn() -> T + Sync + Send,<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: Try<Output = T>,</span></h4></section></summary><div class="docblock"><p>Reduces the items in the iterator into one item using a fallible <code>op</code>. |
| The <code>identity</code> argument is used the same way as in <a href="#method.reduce"><code>reduce()</code></a>.</p> |
| <p>If a <code>Result::Err</code> or <code>Option::None</code> item is found, or if <code>op</code> reduces |
| to one, we will attempt to stop processing the rest of the items in the |
| iterator as soon as possible, and we will return that terminating value. |
| Otherwise, we will return the final reduced <code>Result::Ok(T)</code> or |
| <code>Option::Some(T)</code>. If there are multiple errors in parallel, it is not |
| specified which will be returned.</p> |
| <h5 id="examples-22"><a href="#examples-22">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="comment">// Compute the sum of squares, being careful about overflow. |
| </span><span class="kw">fn </span>sum_squares<I: IntoParallelIterator<Item = i32>>(iter: I) -> <span class="prelude-ty">Option</span><i32> { |
| iter.into_par_iter() |
| .map(|i| i.checked_mul(i)) <span class="comment">// square each item, |
| </span>.try_reduce(|| <span class="number">0</span>, i32::checked_add) <span class="comment">// and add them up! |
| </span>} |
| <span class="macro">assert_eq!</span>(sum_squares(<span class="number">0</span>..<span class="number">5</span>), <span class="prelude-val">Some</span>(<span class="number">0 </span>+ <span class="number">1 </span>+ <span class="number">4 </span>+ <span class="number">9 </span>+ <span class="number">16</span>)); |
| |
| <span class="comment">// The sum might overflow |
| </span><span class="macro">assert_eq!</span>(sum_squares(<span class="number">0</span>..<span class="number">10_000</span>), <span class="prelude-val">None</span>); |
| |
| <span class="comment">// Or the squares might overflow before it even reaches `try_reduce` |
| </span><span class="macro">assert_eq!</span>(sum_squares(<span class="number">1_000_000</span>..<span class="number">1_000_001</span>), <span class="prelude-val">None</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_reduce_with" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1118-1124">source</a><h4 class="code-header">fn <a href="#method.try_reduce_with" class="fnname">try_reduce_with</a><T, OP>(self, op: OP) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><span class="where fmt-newline">where<br> OP: Fn(T, T) -> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> + Sync + Send,<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: Try<Output = T>,</span></h4></section></summary><div class="docblock"><p>Reduces the items in the iterator into one item using a fallible <code>op</code>.</p> |
| <p>Like <a href="#method.reduce_with"><code>reduce_with()</code></a>, if the iterator is empty, <code>None</code> is returned; |
| otherwise, <code>Some</code> is returned. Beyond that, it behaves like |
| <a href="#method.try_reduce"><code>try_reduce()</code></a> for handling <code>Err</code>/<code>None</code>.</p> |
| <p>For instance, with <code>Option</code> items, the return value may be:</p> |
| <ul> |
| <li><code>None</code>, the iterator was empty</li> |
| <li><code>Some(None)</code>, we stopped after encountering <code>None</code>.</li> |
| <li><code>Some(Some(x))</code>, the entire iterator reduced to <code>x</code>.</li> |
| </ul> |
| <p>With <code>Result</code> items, the nesting is more obvious:</p> |
| <ul> |
| <li><code>None</code>, the iterator was empty</li> |
| <li><code>Some(Err(e))</code>, we stopped after encountering an error <code>e</code>.</li> |
| <li><code>Some(Ok(x))</code>, the entire iterator reduced to <code>x</code>.</li> |
| </ul> |
| <h5 id="examples-23"><a href="#examples-23">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>files = [<span class="string">"/dev/null"</span>, <span class="string">"/does/not/exist"</span>]; |
| |
| <span class="comment">// Find the biggest file |
| </span>files.into_par_iter() |
| .map(|path| std::fs::metadata(path).map(|m| (path, m.len()))) |
| .try_reduce_with(|a, b| { |
| <span class="prelude-val">Ok</span>(<span class="kw">if </span>a.<span class="number">1 </span>>= b.<span class="number">1 </span>{ a } <span class="kw">else </span>{ b }) |
| }) |
| .expect(<span class="string">"Some value, since the iterator is not empty"</span>) |
| .expect_err(<span class="string">"not found"</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fold" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1259-1266">source</a><h4 class="code-header">fn <a href="#method.fold" class="fnname">fold</a><T, ID, F>(self, identity: ID, fold_op: F) -> <a class="struct" href="struct.Fold.html" title="struct rayon::iter::Fold">Fold</a><Self, ID, F><span class="where fmt-newline">where<br> F: Fn(T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> T + Sync + Send,<br> ID: Fn() -> T + Sync + Send,<br> T: Send,</span></h4></section></summary><div class="docblock"><p>Parallel fold is similar to sequential fold except that the |
| sequence of items may be subdivided before it is |
| folded. Consider a list of numbers like <code>22 3 77 89 46</code>. If |
| you used sequential fold to add them (<code>fold(0, |a,b| a+b)</code>, |
| you would wind up first adding 0 + 22, then 22 + 3, then 25 + |
| 77, and so forth. The <strong>parallel fold</strong> works similarly except |
| that it first breaks up your list into sublists, and hence |
| instead of yielding up a single sum at the end, it yields up |
| multiple sums. The number of results is nondeterministic, as |
| is the point where the breaks occur.</p> |
| <p>So if we did the same parallel fold (<code>fold(0, |a,b| a+b)</code>) on |
| our example list, we might wind up with a sequence of two numbers, |
| like so:</p> |
| <div class="example-wrap"><pre class="language-notrust"><code>22 3 77 89 46 |
| | | |
| 102 135</code></pre></div> |
| <p>Or perhaps these three numbers:</p> |
| <div class="example-wrap"><pre class="language-notrust"><code>22 3 77 89 46 |
| | | | |
| 102 89 46</code></pre></div> |
| <p>In general, Rayon will attempt to find good breaking points |
| that keep all of your cores busy.</p> |
| <h6 id="fold-versus-reduce"><a href="#fold-versus-reduce">Fold versus reduce</a></h6> |
| <p>The <code>fold()</code> and <code>reduce()</code> methods each take an identity element |
| and a combining function, but they operate rather differently.</p> |
| <p><code>reduce()</code> requires that the identity function has the same |
| type as the things you are iterating over, and it fully |
| reduces the list of items into a single item. So, for example, |
| imagine we are iterating over a list of bytes <code>bytes: [128_u8, 64_u8, 64_u8]</code>. If we used <code>bytes.reduce(|| 0_u8, |a: u8, b: u8| a + b)</code>, we would get an overflow. This is because <code>0</code>, |
| <code>a</code>, and <code>b</code> here are all bytes, just like the numbers in the |
| list (I wrote the types explicitly above, but those are the |
| only types you can use). To avoid the overflow, we would need |
| to do something like <code>bytes.map(|b| b as u32).reduce(|| 0, |a, b| a + b)</code>, in which case our result would be <code>256</code>.</p> |
| <p>In contrast, with <code>fold()</code>, the identity function does not |
| have to have the same type as the things you are iterating |
| over, and you potentially get back many results. So, if we |
| continue with the <code>bytes</code> example from the previous paragraph, |
| we could do <code>bytes.fold(|| 0_u32, |a, b| a + (b as u32))</code> to |
| convert our bytes into <code>u32</code>. And of course we might not get |
| back a single sum.</p> |
| <p>There is a more subtle distinction as well, though it’s |
| actually implied by the above points. When you use <code>reduce()</code>, |
| your reduction function is sometimes called with values that |
| were never part of your original parallel iterator (for |
| example, both the left and right might be a partial sum). With |
| <code>fold()</code>, in contrast, the left value in the fold function is |
| always the accumulator, and the right value is always from |
| your original sequence.</p> |
| <h6 id="fold-vs-mapreduce"><a href="#fold-vs-mapreduce">Fold vs Map/Reduce</a></h6> |
| <p>Fold makes sense if you have some operation where it is |
| cheaper to create groups of elements at a time. For example, |
| imagine collecting characters into a string. If you were going |
| to use map/reduce, you might try this:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>s = |
| [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>] |
| .par_iter() |
| .map(|c: <span class="kw-2">&</span>char| <span class="macro">format!</span>(<span class="string">"{}"</span>, c)) |
| .reduce(|| String::new(), |
| |<span class="kw-2">mut </span>a: String, b: String| { a.push_str(<span class="kw-2">&</span>b); a }); |
| |
| <span class="macro">assert_eq!</span>(s, <span class="string">"abcde"</span>);</code></pre></div> |
| <p>Because reduce produces the same type of element as its input, |
| you have to first map each character into a string, and then |
| you can reduce them. This means we create one string per |
| element in our iterator – not so great. Using <code>fold</code>, we can |
| do this instead:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>s = |
| [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>] |
| .par_iter() |
| .fold(|| String::new(), |
| |<span class="kw-2">mut </span>s: String, c: <span class="kw-2">&</span>char| { s.push(<span class="kw-2">*</span>c); s }) |
| .reduce(|| String::new(), |
| |<span class="kw-2">mut </span>a: String, b: String| { a.push_str(<span class="kw-2">&</span>b); a }); |
| |
| <span class="macro">assert_eq!</span>(s, <span class="string">"abcde"</span>);</code></pre></div> |
| <p>Now <code>fold</code> will process groups of our characters at a time, |
| and we only make one string per group. We should wind up with |
| some small-ish number of strings roughly proportional to the |
| number of CPUs you have (it will ultimately depend on how busy |
| your processors are). Note that we still need to do a reduce |
| afterwards to combine those groups of strings into a single |
| string.</p> |
| <p>You could use a similar trick to save partial results (e.g., a |
| cache) or something similar.</p> |
| <h6 id="combining-fold-with-other-operations"><a href="#combining-fold-with-other-operations">Combining fold with other operations</a></h6> |
| <p>You can combine <code>fold</code> with <code>reduce</code> if you want to produce a |
| single value. This is then roughly equivalent to a map/reduce |
| combination in effect:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>bytes = <span class="number">0</span>..<span class="number">22_u8</span>; |
| <span class="kw">let </span>sum = bytes.into_par_iter() |
| .fold(|| <span class="number">0_u32</span>, |a: u32, b: u8| a + (b <span class="kw">as </span>u32)) |
| .sum::<u32>(); |
| |
| <span class="macro">assert_eq!</span>(sum, (<span class="number">0</span>..<span class="number">22</span>).sum()); <span class="comment">// compare to sequential</span></code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fold_with" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1287-1293">source</a><h4 class="code-header">fn <a href="#method.fold_with" class="fnname">fold_with</a><F, T>(self, init: T, fold_op: F) -> <a class="struct" href="struct.FoldWith.html" title="struct rayon::iter::FoldWith">FoldWith</a><Self, T, F><span class="where fmt-newline">where<br> F: Fn(T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> T + Sync + Send,<br> T: Send + Clone,</span></h4></section></summary><div class="docblock"><p>Applies <code>fold_op</code> to the given <code>init</code> value with each item of this |
| iterator, finally producing the value for further use.</p> |
| <p>This works essentially like <code>fold(|| init.clone(), fold_op)</code>, except |
| it doesn’t require the <code>init</code> type to be <code>Sync</code>, nor any other form |
| of added synchronization.</p> |
| <h5 id="examples-24"><a href="#examples-24">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>bytes = <span class="number">0</span>..<span class="number">22_u8</span>; |
| <span class="kw">let </span>sum = bytes.into_par_iter() |
| .fold_with(<span class="number">0_u32</span>, |a: u32, b: u8| a + (b <span class="kw">as </span>u32)) |
| .sum::<u32>(); |
| |
| <span class="macro">assert_eq!</span>(sum, (<span class="number">0</span>..<span class="number">22</span>).sum()); <span class="comment">// compare to sequential</span></code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_fold" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1320-1327">source</a><h4 class="code-header">fn <a href="#method.try_fold" class="fnname">try_fold</a><T, R, ID, F>(<br> self,<br> identity: ID,<br> fold_op: F<br>) -> <a class="struct" href="struct.TryFold.html" title="struct rayon::iter::TryFold">TryFold</a><Self, R, ID, F><span class="where fmt-newline">where<br> F: Fn(T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> ID: Fn() -> T + Sync + Send,<br> R: Try<Output = T> + Send,</span></h4></section></summary><div class="docblock"><p>Performs a fallible parallel fold.</p> |
| <p>This is a variation of <a href="#method.fold"><code>fold()</code></a> for operations which can fail with |
| <code>Option::None</code> or <code>Result::Err</code>. The first such failure stops |
| processing the local set of items, without affecting other folds in the |
| iterator’s subdivisions.</p> |
| <p>Often, <code>try_fold()</code> will be followed by <a href="#method.try_reduce"><code>try_reduce()</code></a> |
| for a final reduction and global short-circuiting effect.</p> |
| <h5 id="examples-25"><a href="#examples-25">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>bytes = <span class="number">0</span>..<span class="number">22_u8</span>; |
| <span class="kw">let </span>sum = bytes.into_par_iter() |
| .try_fold(|| <span class="number">0_u32</span>, |a: u32, b: u8| a.checked_add(b <span class="kw">as </span>u32)) |
| .try_reduce(|| <span class="number">0</span>, u32::checked_add); |
| |
| <span class="macro">assert_eq!</span>(sum, <span class="prelude-val">Some</span>((<span class="number">0</span>..<span class="number">22</span>).sum())); <span class="comment">// compare to sequential</span></code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_fold_with" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1347-1354">source</a><h4 class="code-header">fn <a href="#method.try_fold_with" class="fnname">try_fold_with</a><F, T, R>(self, init: T, fold_op: F) -> <a class="struct" href="struct.TryFoldWith.html" title="struct rayon::iter::TryFoldWith">TryFoldWith</a><Self, R, F><span class="where fmt-newline">where<br> F: Fn(T, Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> R: Try<Output = T> + Send,<br> T: Clone + Send,</span></h4></section></summary><div class="docblock"><p>Performs a fallible parallel fold with a cloneable <code>init</code> value.</p> |
| <p>This combines the <code>init</code> semantics of <a href="#method.fold_with"><code>fold_with()</code></a> and the failure |
| semantics of <a href="#method.try_fold"><code>try_fold()</code></a>.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>bytes = <span class="number">0</span>..<span class="number">22_u8</span>; |
| <span class="kw">let </span>sum = bytes.into_par_iter() |
| .try_fold_with(<span class="number">0_u32</span>, |a: u32, b: u8| a.checked_add(b <span class="kw">as </span>u32)) |
| .try_reduce(|| <span class="number">0</span>, u32::checked_add); |
| |
| <span class="macro">assert_eq!</span>(sum, <span class="prelude-val">Some</span>((<span class="number">0</span>..<span class="number">22</span>).sum())); <span class="comment">// compare to sequential</span></code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sum" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1380-1385">source</a><h4 class="code-header">fn <a href="#method.sum" class="fnname">sum</a><S>(self) -> S<span class="where fmt-newline">where<br> S: Send + Sum<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>> + Sum<S>,</span></h4></section></summary><div class="docblock"><p>Sums up the items in the iterator.</p> |
| <p>Note that the order in items will be reduced is not specified, |
| so if the <code>+</code> operator is not truly <a href="https://en.wikipedia.org/wiki/Associative_property">associative</a> (as is the |
| case for floating point numbers), then the results are not |
| fully deterministic.</p> |
| <p>Basically equivalent to <code>self.reduce(|| 0, |a, b| a + b)</code>, |
| except that the type of <code>0</code> and the <code>+</code> operation may vary |
| depending on the type of value being produced.</p> |
| <h5 id="examples-26"><a href="#examples-26">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">5</span>, <span class="number">7</span>]; |
| |
| <span class="kw">let </span>sum: i32 = a.par_iter().sum(); |
| |
| <span class="macro">assert_eq!</span>(sum, <span class="number">13</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.product" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1413-1418">source</a><h4 class="code-header">fn <a href="#method.product" class="fnname">product</a><P>(self) -> P<span class="where fmt-newline">where<br> P: Send + Product<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>> + Product<P>,</span></h4></section></summary><div class="docblock"><p>Multiplies all the items in the iterator.</p> |
| <p>Note that the order in items will be reduced is not specified, |
| so if the <code>*</code> operator is not truly <a href="https://en.wikipedia.org/wiki/Associative_property">associative</a> (as is the |
| case for floating point numbers), then the results are not |
| fully deterministic.</p> |
| <p>Basically equivalent to <code>self.reduce(|| 1, |a, b| a * b)</code>, |
| except that the type of <code>1</code> and the <code>*</code> operation may vary |
| depending on the type of value being produced.</p> |
| <h5 id="examples-27"><a href="#examples-27">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">fn </span>factorial(n: u32) -> u32 { |
| (<span class="number">1</span>..n+<span class="number">1</span>).into_par_iter().product() |
| } |
| |
| <span class="macro">assert_eq!</span>(factorial(<span class="number">0</span>), <span class="number">1</span>); |
| <span class="macro">assert_eq!</span>(factorial(<span class="number">1</span>), <span class="number">1</span>); |
| <span class="macro">assert_eq!</span>(factorial(<span class="number">5</span>), <span class="number">120</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1443-1448">source</a><h4 class="code-header">fn <a href="#method.min" class="fnname">min</a>(self) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><span class="where fmt-newline">where<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: Ord,</span></h4></section></summary><div class="docblock"><p>Computes the minimum of all the items in the iterator. If the |
| iterator is empty, <code>None</code> is returned; otherwise, <code>Some(min)</code> |
| is returned.</p> |
| <p>Note that the order in which the items will be reduced is not |
| specified, so if the <code>Ord</code> impl is not truly associative, then |
| the results are not deterministic.</p> |
| <p>Basically equivalent to <code>self.reduce_with(|a, b| cmp::min(a, b))</code>.</p> |
| <h5 id="examples-28"><a href="#examples-28">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">45</span>, <span class="number">74</span>, <span class="number">32</span>]; |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().min(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">32</span>)); |
| |
| <span class="kw">let </span>b: [i32; <span class="number">0</span>] = []; |
| |
| <span class="macro">assert_eq!</span>(b.par_iter().min(), <span class="prelude-val">None</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min_by" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1467-1479">source</a><h4 class="code-header">fn <a href="#method.min_by" class="fnname">min_by</a><F>(self, f: F) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><span class="where fmt-newline">where<br> F: Sync + Send + Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, &Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Ordering,</span></h4></section></summary><div class="docblock"><p>Computes the minimum of all the items in the iterator with respect to |
| the given comparison function. If the iterator is empty, <code>None</code> is |
| returned; otherwise, <code>Some(min)</code> is returned.</p> |
| <p>Note that the order in which the items will be reduced is not |
| specified, so if the comparison function is not associative, then |
| the results are not deterministic.</p> |
| <h5 id="examples-29"><a href="#examples-29">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [-<span class="number">3_i32</span>, <span class="number">77</span>, <span class="number">53</span>, <span class="number">240</span>, -<span class="number">1</span>]; |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().min_by(|x, y| x.cmp(y)), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>-<span class="number">3</span>));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min_by_key" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1498-1516">source</a><h4 class="code-header">fn <a href="#method.min_by_key" class="fnname">min_by_key</a><K, F>(self, f: F) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><span class="where fmt-newline">where<br> K: Ord + Send,<br> F: Sync + Send + Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> K,</span></h4></section></summary><div class="docblock"><p>Computes the item that yields the minimum value for the given |
| function. If the iterator is empty, <code>None</code> is returned; |
| otherwise, <code>Some(item)</code> is returned.</p> |
| <p>Note that the order in which the items will be reduced is not |
| specified, so if the <code>Ord</code> impl is not truly associative, then |
| the results are not deterministic.</p> |
| <h5 id="examples-30"><a href="#examples-30">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [-<span class="number">3_i32</span>, <span class="number">34</span>, <span class="number">2</span>, <span class="number">5</span>, -<span class="number">10</span>, -<span class="number">3</span>, -<span class="number">23</span>]; |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().min_by_key(|x| x.abs()), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">2</span>));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1541-1546">source</a><h4 class="code-header">fn <a href="#method.max" class="fnname">max</a>(self) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><span class="where fmt-newline">where<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: Ord,</span></h4></section></summary><div class="docblock"><p>Computes the maximum of all the items in the iterator. If the |
| iterator is empty, <code>None</code> is returned; otherwise, <code>Some(max)</code> |
| is returned.</p> |
| <p>Note that the order in which the items will be reduced is not |
| specified, so if the <code>Ord</code> impl is not truly associative, then |
| the results are not deterministic.</p> |
| <p>Basically equivalent to <code>self.reduce_with(|a, b| cmp::max(a, b))</code>.</p> |
| <h5 id="examples-31"><a href="#examples-31">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">45</span>, <span class="number">74</span>, <span class="number">32</span>]; |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().max(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">74</span>)); |
| |
| <span class="kw">let </span>b: [i32; <span class="number">0</span>] = []; |
| |
| <span class="macro">assert_eq!</span>(b.par_iter().max(), <span class="prelude-val">None</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max_by" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1565-1577">source</a><h4 class="code-header">fn <a href="#method.max_by" class="fnname">max_by</a><F>(self, f: F) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><span class="where fmt-newline">where<br> F: Sync + Send + Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, &Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Ordering,</span></h4></section></summary><div class="docblock"><p>Computes the maximum of all the items in the iterator with respect to |
| the given comparison function. If the iterator is empty, <code>None</code> is |
| returned; otherwise, <code>Some(min)</code> is returned.</p> |
| <p>Note that the order in which the items will be reduced is not |
| specified, so if the comparison function is not associative, then |
| the results are not deterministic.</p> |
| <h5 id="examples-32"><a href="#examples-32">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [-<span class="number">3_i32</span>, <span class="number">77</span>, <span class="number">53</span>, <span class="number">240</span>, -<span class="number">1</span>]; |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().max_by(|x, y| x.abs().cmp(<span class="kw-2">&</span>y.abs())), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">240</span>));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max_by_key" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1596-1614">source</a><h4 class="code-header">fn <a href="#method.max_by_key" class="fnname">max_by_key</a><K, F>(self, f: F) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><span class="where fmt-newline">where<br> K: Ord + Send,<br> F: Sync + Send + Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> K,</span></h4></section></summary><div class="docblock"><p>Computes the item that yields the maximum value for the given |
| function. If the iterator is empty, <code>None</code> is returned; |
| otherwise, <code>Some(item)</code> is returned.</p> |
| <p>Note that the order in which the items will be reduced is not |
| specified, so if the <code>Ord</code> impl is not truly associative, then |
| the results are not deterministic.</p> |
| <h5 id="examples-33"><a href="#examples-33">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [-<span class="number">3_i32</span>, <span class="number">34</span>, <span class="number">2</span>, <span class="number">5</span>, -<span class="number">10</span>, -<span class="number">3</span>, -<span class="number">23</span>]; |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().max_by_key(|x| x.abs()), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">34</span>));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1632-1637">source</a><h4 class="code-header">fn <a href="#method.chain" class="fnname">chain</a><C>(self, chain: C) -> <a class="struct" href="struct.Chain.html" title="struct rayon::iter::Chain">Chain</a><Self, C::<a class="associatedtype" href="trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>><span class="where fmt-newline">where<br> C: <a class="trait" href="trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a><Item = Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,</span></h4></section></summary><div class="docblock"><p>Takes two iterators and creates a new iterator over both.</p> |
| <h5 id="examples-34"><a href="#examples-34">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; |
| <span class="kw">let </span>b = [<span class="number">9</span>, <span class="number">8</span>, <span class="number">7</span>]; |
| |
| <span class="kw">let </span>par_iter = a.par_iter().chain(b.par_iter()); |
| |
| <span class="kw">let </span>chained: Vec<<span class="kw">_</span>> = par_iter.cloned().collect(); |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>chained[..], <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">9</span>, <span class="number">8</span>, <span class="number">7</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.find_any" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1662-1667">source</a><h4 class="code-header">fn <a href="#method.find_any" class="fnname">find_any</a><P>(self, predicate: P) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><span class="where fmt-newline">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Searches for <strong>some</strong> item in the parallel iterator that |
| matches the given predicate and returns it. This operation |
| is similar to <a href="https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.find"><code>find</code> on sequential iterators</a> but |
| the item returned may not be the <strong>first</strong> one in the parallel |
| sequence which matches, since we search the entire sequence in parallel.</p> |
| <p>Once a match is found, we will attempt to stop processing |
| the rest of the items in the iterator as soon as possible |
| (just as <code>find</code> stops iterating once a match is found).</p> |
| <h5 id="examples-35"><a href="#examples-35">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>]; |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().find_any(|&&x| x == <span class="number">3</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">3</span>)); |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().find_any(|&&x| x == <span class="number">100</span>), <span class="prelude-val">None</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.find_first" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1692-1697">source</a><h4 class="code-header">fn <a href="#method.find_first" class="fnname">find_first</a><P>(self, predicate: P) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><span class="where fmt-newline">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Searches for the sequentially <strong>first</strong> item in the parallel iterator |
| that matches the given predicate and returns it.</p> |
| <p>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.</p> |
| <p>Note that not all parallel iterators have a useful order, much like |
| sequential <code>HashMap</code> iteration, so “first” may be nebulous. If you |
| just want the first match that discovered anywhere in the iterator, |
| <code>find_any</code> is a better choice.</p> |
| <h5 id="examples-36"><a href="#examples-36">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>]; |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().find_first(|&&x| x == <span class="number">3</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">3</span>)); |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().find_first(|&&x| x == <span class="number">100</span>), <span class="prelude-val">None</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.find_last" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1721-1726">source</a><h4 class="code-header">fn <a href="#method.find_last" class="fnname">find_last</a><P>(self, predicate: P) -> Option<Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>><span class="where fmt-newline">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Searches for the sequentially <strong>last</strong> item in the parallel iterator |
| that matches the given predicate and returns it.</p> |
| <p>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.</p> |
| <p>Note that not all parallel iterators have a useful order, much like |
| sequential <code>HashMap</code> iteration, so “last” may be nebulous. When the |
| order doesn’t actually matter to you, <code>find_any</code> is a better choice.</p> |
| <h5 id="examples-37"><a href="#examples-37">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>]; |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().find_last(|&&x| x == <span class="number">3</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">3</span>)); |
| |
| <span class="macro">assert_eq!</span>(a.par_iter().find_last(|&&x| x == <span class="number">100</span>), <span class="prelude-val">None</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.find_map_any" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1751-1760">source</a><h4 class="code-header">fn <a href="#method.find_map_any" class="fnname">find_map_any</a><P, R>(self, predicate: P) -> Option<R><span class="where fmt-newline">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Option<R> + Sync + Send,<br> R: Send,</span></h4></section></summary><div class="docblock"><p>Applies the given predicate to the items in the parallel iterator |
| and returns <strong>any</strong> non-None result of the map operation.</p> |
| <p>Once a non-None value is produced from the map operation, we will |
| attempt to stop processing the rest of the items in the iterator |
| as soon as possible.</p> |
| <p>Note that this method only returns <strong>some</strong> item in the parallel |
| iterator that is not None from the map predicate. The item returned |
| may not be the <strong>first</strong> non-None value produced in the parallel |
| sequence, since the entire sequence is mapped over in parallel.</p> |
| <h5 id="examples-38"><a href="#examples-38">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>c = [<span class="string">"lol"</span>, <span class="string">"NaN"</span>, <span class="string">"5"</span>, <span class="string">"5"</span>]; |
| |
| <span class="kw">let </span>found_number = c.par_iter().find_map_any(|s| s.parse().ok()); |
| |
| <span class="macro">assert_eq!</span>(found_number, <span class="prelude-val">Some</span>(<span class="number">5</span>));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.find_map_first" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1785-1794">source</a><h4 class="code-header">fn <a href="#method.find_map_first" class="fnname">find_map_first</a><P, R>(self, predicate: P) -> Option<R><span class="where fmt-newline">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Option<R> + Sync + Send,<br> R: Send,</span></h4></section></summary><div class="docblock"><p>Applies the given predicate to the items in the parallel iterator and |
| returns the sequentially <strong>first</strong> non-None result of the map operation.</p> |
| <p>Once a non-None value is produced from the map operation, 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.</p> |
| <p>Note that not all parallel iterators have a useful order, much like |
| sequential <code>HashMap</code> iteration, so “first” may be nebulous. If you |
| just want the first non-None value discovered anywhere in the iterator, |
| <code>find_map_any</code> is a better choice.</p> |
| <h5 id="examples-39"><a href="#examples-39">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>c = [<span class="string">"lol"</span>, <span class="string">"NaN"</span>, <span class="string">"2"</span>, <span class="string">"5"</span>]; |
| |
| <span class="kw">let </span>first_number = c.par_iter().find_map_first(|s| s.parse().ok()); |
| |
| <span class="macro">assert_eq!</span>(first_number, <span class="prelude-val">Some</span>(<span class="number">2</span>));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.find_map_last" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1819-1828">source</a><h4 class="code-header">fn <a href="#method.find_map_last" class="fnname">find_map_last</a><P, R>(self, predicate: P) -> Option<R><span class="where fmt-newline">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Option<R> + Sync + Send,<br> R: Send,</span></h4></section></summary><div class="docblock"><p>Applies the given predicate to the items in the parallel iterator and |
| returns the sequentially <strong>last</strong> non-None result of the map operation.</p> |
| <p>Once a non-None value is produced from the map operation, 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.</p> |
| <p>Note that not all parallel iterators have a useful order, much like |
| sequential <code>HashMap</code> iteration, so “first” may be nebulous. If you |
| just want the first non-None value discovered anywhere in the iterator, |
| <code>find_map_any</code> is a better choice.</p> |
| <h5 id="examples-40"><a href="#examples-40">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>c = [<span class="string">"lol"</span>, <span class="string">"NaN"</span>, <span class="string">"2"</span>, <span class="string">"5"</span>]; |
| |
| <span class="kw">let </span>last_number = c.par_iter().find_map_last(|s| s.parse().ok()); |
| |
| <span class="macro">assert_eq!</span>(last_number, <span class="prelude-val">Some</span>(<span class="number">5</span>));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.any" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1857-1862">source</a><h4 class="code-header">fn <a href="#method.any" class="fnname">any</a><P>(self, predicate: P) -> bool<span class="where fmt-newline">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Searches for <strong>some</strong> item in the parallel iterator that |
| matches the given predicate, and if so returns true. Once |
| a match is found, we’ll attempt to stop process the rest |
| of the items. Proving that there’s no match, returning false, |
| does require visiting every item.</p> |
| <h5 id="examples-41"><a href="#examples-41">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">0</span>, <span class="number">12</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">0</span>, <span class="number">23</span>, <span class="number">0</span>]; |
| |
| <span class="kw">let </span>is_valid = a.par_iter().any(|<span class="kw-2">&</span>x| x > <span class="number">10</span>); |
| |
| <span class="macro">assert!</span>(is_valid);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.all" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1879-1889">source</a><h4 class="code-header">fn <a href="#method.all" class="fnname">all</a><P>(self, predicate: P) -> bool<span class="where fmt-newline">where<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Tests that every item in the parallel iterator matches the given |
| predicate, and if so returns true. If a counter-example is found, |
| we’ll attempt to stop processing more items, then return false.</p> |
| <h5 id="examples-42"><a href="#examples-42">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [<span class="number">0</span>, <span class="number">12</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">0</span>, <span class="number">23</span>, <span class="number">0</span>]; |
| |
| <span class="kw">let </span>is_valid = a.par_iter().all(|<span class="kw-2">&</span>x| x > <span class="number">10</span>); |
| |
| <span class="macro">assert!</span>(!is_valid);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.while_some" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1913-1919">source</a><h4 class="code-header">fn <a href="#method.while_some" class="fnname">while_some</a><T>(self) -> <a class="struct" href="struct.WhileSome.html" title="struct rayon::iter::WhileSome">WhileSome</a><Self><span class="where fmt-newline">where<br> Self: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = Option<T>>,<br> T: Send,</span></h4></section></summary><div class="docblock"><p>Creates an iterator over the <code>Some</code> items of this iterator, halting |
| as soon as any <code>None</code> is found.</p> |
| <h5 id="examples-43"><a href="#examples-43">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">use </span>std::sync::atomic::{AtomicUsize, Ordering}; |
| |
| <span class="kw">let </span>counter = AtomicUsize::new(<span class="number">0</span>); |
| <span class="kw">let </span>value = (<span class="number">0_i32</span>..<span class="number">2048</span>) |
| .into_par_iter() |
| .map(|x| { |
| counter.fetch_add(<span class="number">1</span>, Ordering::SeqCst); |
| <span class="kw">if </span>x < <span class="number">1024 </span>{ <span class="prelude-val">Some</span>(x) } <span class="kw">else </span>{ <span class="prelude-val">None </span>} |
| }) |
| .while_some() |
| .max(); |
| |
| <span class="macro">assert!</span>(value < <span class="prelude-val">Some</span>(<span class="number">1024</span>)); |
| <span class="macro">assert!</span>(counter.load(Ordering::SeqCst) < <span class="number">2048</span>); <span class="comment">// should not have visited every single one</span></code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.panic_fuse" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#1951-1953">source</a><h4 class="code-header">fn <a href="#method.panic_fuse" class="fnname">panic_fuse</a>(self) -> <a class="struct" href="struct.PanicFuse.html" title="struct rayon::iter::PanicFuse">PanicFuse</a><Self></h4></section></summary><div class="docblock"><p>Wraps an iterator with a fuse in case of panics, to halt all threads |
| as soon as possible.</p> |
| <p>Panics within parallel iterators are always propagated to the caller, |
| but they don’t always halt the rest of the iterator right away, due to |
| the internal semantics of <a href="../fn.join.html#panics"><code>join</code></a>. This adaptor makes a greater effort |
| to stop processing other items sooner, with the cost of additional |
| synchronization overhead, which may also inhibit some optimizations.</p> |
| <h5 id="examples-44"><a href="#examples-44">Examples</a></h5> |
| <p>If this code didn’t use <code>panic_fuse()</code>, it would continue processing |
| many more items in other threads (with long sleep delays) before the |
| panic is finally propagated.</p> |
| |
| <div class="example-wrap should_panic"><div class='tooltip'>ⓘ</div><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">use </span>std::{thread, time}; |
| |
| (<span class="number">0</span>..<span class="number">1_000_000</span>) |
| .into_par_iter() |
| .panic_fuse() |
| .for_each(|i| { |
| <span class="comment">// simulate some work |
| </span>thread::sleep(time::Duration::from_secs(<span class="number">1</span>)); |
| <span class="macro">assert!</span>(i > <span class="number">0</span>); <span class="comment">// oops! |
| </span>});</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.collect" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#2052-2057">source</a><h4 class="code-header">fn <a href="#method.collect" class="fnname">collect</a><C>(self) -> C<span class="where fmt-newline">where<br> C: <a class="trait" href="trait.FromParallelIterator.html" title="trait rayon::iter::FromParallelIterator">FromParallelIterator</a><Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,</span></h4></section></summary><div class="docblock"><p>Creates a fresh collection containing all the elements produced |
| by this parallel iterator.</p> |
| <p>You may prefer <a href="trait.IndexedParallelIterator.html#method.collect_into_vec"><code>collect_into_vec()</code></a> implemented on |
| <a href="trait.IndexedParallelIterator.html"><code>IndexedParallelIterator</code></a>, if your underlying iterator also implements |
| it. <a href="trait.IndexedParallelIterator.html#method.collect_into_vec"><code>collect_into_vec()</code></a> allocates efficiently with precise knowledge |
| of how many elements the iterator contains, and even allows you to reuse |
| an existing vector’s backing store rather than allocating a fresh vector.</p> |
| <h5 id="examples-45"><a href="#examples-45">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>sync_vec: Vec<<span class="kw">_</span>> = (<span class="number">0</span>..<span class="number">100</span>).into_iter().collect(); |
| |
| <span class="kw">let </span>async_vec: Vec<<span class="kw">_</span>> = (<span class="number">0</span>..<span class="number">100</span>).into_par_iter().collect(); |
| |
| <span class="macro">assert_eq!</span>(sync_vec, async_vec);</code></pre></div> |
| <p>You can collect a pair of collections like <a href="#method.unzip"><code>unzip</code></a> |
| for paired items:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [(<span class="number">0</span>, <span class="number">1</span>), (<span class="number">1</span>, <span class="number">2</span>), (<span class="number">2</span>, <span class="number">3</span>), (<span class="number">3</span>, <span class="number">4</span>)]; |
| <span class="kw">let </span>(first, second): (Vec<<span class="kw">_</span>>, Vec<<span class="kw">_</span>>) = a.into_par_iter().collect(); |
| |
| <span class="macro">assert_eq!</span>(first, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]); |
| <span class="macro">assert_eq!</span>(second, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> |
| <p>Or like <a href="#method.partition_map"><code>partition_map</code></a> for <code>Either</code> items:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">use </span>rayon::iter::Either; |
| |
| <span class="kw">let </span>(left, right): (Vec<<span class="kw">_</span>>, Vec<<span class="kw">_</span>>) = (<span class="number">0</span>..<span class="number">8</span>).into_par_iter().map(|x| { |
| <span class="kw">if </span>x % <span class="number">2 </span>== <span class="number">0 </span>{ |
| Either::Left(x * <span class="number">4</span>) |
| } <span class="kw">else </span>{ |
| Either::Right(x * <span class="number">3</span>) |
| } |
| }).collect(); |
| |
| <span class="macro">assert_eq!</span>(left, [<span class="number">0</span>, <span class="number">8</span>, <span class="number">16</span>, <span class="number">24</span>]); |
| <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">9</span>, <span class="number">15</span>, <span class="number">21</span>]);</code></pre></div> |
| <p>You can even collect an arbitrarily-nested combination of pairs and <code>Either</code>:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">use </span>rayon::iter::Either; |
| |
| <span class="kw">let </span>(first, (left, right)): (Vec<<span class="kw">_</span>>, (Vec<<span class="kw">_</span>>, Vec<<span class="kw">_</span>>)) |
| = (<span class="number">0</span>..<span class="number">8</span>).into_par_iter().map(|x| { |
| <span class="kw">if </span>x % <span class="number">2 </span>== <span class="number">0 </span>{ |
| (x, Either::Left(x * <span class="number">4</span>)) |
| } <span class="kw">else </span>{ |
| (-x, Either::Right(x * <span class="number">3</span>)) |
| } |
| }).collect(); |
| |
| <span class="macro">assert_eq!</span>(first, [<span class="number">0</span>, -<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>, <span class="number">6</span>, -<span class="number">7</span>]); |
| <span class="macro">assert_eq!</span>(left, [<span class="number">0</span>, <span class="number">8</span>, <span class="number">16</span>, <span class="number">24</span>]); |
| <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">9</span>, <span class="number">15</span>, <span class="number">21</span>]);</code></pre></div> |
| <p>All of that can <em>also</em> be combined with short-circuiting collection of |
| <code>Result</code> or <code>Option</code> types:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">use </span>rayon::iter::Either; |
| |
| <span class="kw">let </span>result: <span class="prelude-ty">Result</span><(Vec<<span class="kw">_</span>>, (Vec<<span class="kw">_</span>>, Vec<<span class="kw">_</span>>)), <span class="kw">_</span>> |
| = (<span class="number">0</span>..<span class="number">8</span>).into_par_iter().map(|x| { |
| <span class="kw">if </span>x > <span class="number">5 </span>{ |
| <span class="prelude-val">Err</span>(x) |
| } <span class="kw">else if </span>x % <span class="number">2 </span>== <span class="number">0 </span>{ |
| <span class="prelude-val">Ok</span>((x, Either::Left(x * <span class="number">4</span>))) |
| } <span class="kw">else </span>{ |
| <span class="prelude-val">Ok</span>((-x, Either::Right(x * <span class="number">3</span>))) |
| } |
| }).collect(); |
| |
| <span class="kw">let </span>error = result.unwrap_err(); |
| <span class="macro">assert!</span>(error == <span class="number">6 </span>|| error == <span class="number">7</span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.unzip" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#2093-2102">source</a><h4 class="code-header">fn <a href="#method.unzip" class="fnname">unzip</a><A, B, FromA, FromB>(self) -> (FromA, FromB)<span class="where fmt-newline">where<br> Self: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = (A, B)>,<br> FromA: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><A>,<br> FromB: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><B>,<br> A: Send,<br> B: Send,</span></h4></section></summary><div class="docblock"><p>Unzips the items of a parallel iterator into a pair of arbitrary |
| <code>ParallelExtend</code> containers.</p> |
| <p>You may prefer to use <code>unzip_into_vecs()</code>, which allocates more |
| efficiently with precise knowledge of how many elements the |
| iterator contains, and even allows you to reuse existing |
| vectors’ backing stores rather than allocating fresh vectors.</p> |
| <h5 id="examples-46"><a href="#examples-46">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>a = [(<span class="number">0</span>, <span class="number">1</span>), (<span class="number">1</span>, <span class="number">2</span>), (<span class="number">2</span>, <span class="number">3</span>), (<span class="number">3</span>, <span class="number">4</span>)]; |
| |
| <span class="kw">let </span>(left, right): (Vec<<span class="kw">_</span>>, Vec<<span class="kw">_</span>>) = a.par_iter().cloned().unzip(); |
| |
| <span class="macro">assert_eq!</span>(left, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]); |
| <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> |
| <p>Nested pairs can be unzipped too.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>(values, (squares, cubes)): (Vec<<span class="kw">_</span>>, (Vec<<span class="kw">_</span>>, Vec<<span class="kw">_</span>>)) = (<span class="number">0</span>..<span class="number">4</span>).into_par_iter() |
| .map(|i| (i, (i * i, i * i * i))) |
| .unzip(); |
| |
| <span class="macro">assert_eq!</span>(values, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]); |
| <span class="macro">assert_eq!</span>(squares, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">4</span>, <span class="number">9</span>]); |
| <span class="macro">assert_eq!</span>(cubes, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">8</span>, <span class="number">27</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#2123-2130">source</a><h4 class="code-header">fn <a href="#method.partition" class="fnname">partition</a><A, B, P>(self, predicate: P) -> (A, B)<span class="where fmt-newline">where<br> A: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,<br> B: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Partitions the items of a parallel iterator into a pair of arbitrary |
| <code>ParallelExtend</code> containers. Items for which the <code>predicate</code> returns |
| true go into the first container, and the rest go into the second.</p> |
| <p>Note: unlike the standard <code>Iterator::partition</code>, this allows distinct |
| collection types for the left and right items. This is more flexible, |
| but may require new type annotations when converting sequential code |
| that used type inference assuming the two were the same.</p> |
| <h5 id="examples-47"><a href="#examples-47">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>(left, right): (Vec<<span class="kw">_</span>>, Vec<<span class="kw">_</span>>) = (<span class="number">0</span>..<span class="number">8</span>).into_par_iter().partition(|x| x % <span class="number">2 </span>== <span class="number">0</span>); |
| |
| <span class="macro">assert_eq!</span>(left, [<span class="number">0</span>, <span class="number">2</span>, <span class="number">4</span>, <span class="number">6</span>]); |
| <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">7</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition_map" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#2175-2184">source</a><h4 class="code-header">fn <a href="#method.partition_map" class="fnname">partition_map</a><A, B, P, L, R>(self, predicate: P) -> (A, B)<span class="where fmt-newline">where<br> A: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><L>,<br> B: Default + Send + <a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">ParallelExtend</a><R>,<br> P: Fn(Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> <a class="enum" href="enum.Either.html" title="enum rayon::iter::Either">Either</a><L, R> + Sync + Send,<br> L: Send,<br> R: Send,</span></h4></section></summary><div class="docblock"><p>Partitions and maps the items of a parallel iterator into a pair of |
| arbitrary <code>ParallelExtend</code> containers. <code>Either::Left</code> items go into |
| the first container, and <code>Either::Right</code> items go into the second.</p> |
| <h5 id="examples-48"><a href="#examples-48">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">use </span>rayon::iter::Either; |
| |
| <span class="kw">let </span>(left, right): (Vec<<span class="kw">_</span>>, Vec<<span class="kw">_</span>>) = (<span class="number">0</span>..<span class="number">8</span>).into_par_iter() |
| .partition_map(|x| { |
| <span class="kw">if </span>x % <span class="number">2 </span>== <span class="number">0 </span>{ |
| Either::Left(x * <span class="number">4</span>) |
| } <span class="kw">else </span>{ |
| Either::Right(x * <span class="number">3</span>) |
| } |
| }); |
| |
| <span class="macro">assert_eq!</span>(left, [<span class="number">0</span>, <span class="number">8</span>, <span class="number">16</span>, <span class="number">24</span>]); |
| <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">9</span>, <span class="number">15</span>, <span class="number">21</span>]);</code></pre></div> |
| <p>Nested <code>Either</code> enums can be split as well.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">use </span>rayon::iter::Either::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>((fizzbuzz, fizz), (buzz, other)): ((Vec<<span class="kw">_</span>>, Vec<<span class="kw">_</span>>), (Vec<<span class="kw">_</span>>, Vec<<span class="kw">_</span>>)) = (<span class="number">1</span>..<span class="number">20</span>) |
| .into_par_iter() |
| .partition_map(|x| <span class="kw">match </span>(x % <span class="number">3</span>, x % <span class="number">5</span>) { |
| (<span class="number">0</span>, <span class="number">0</span>) => Left(Left(x)), |
| (<span class="number">0</span>, <span class="kw">_</span>) => Left(Right(x)), |
| (<span class="kw">_</span>, <span class="number">0</span>) => Right(Left(x)), |
| (<span class="kw">_</span>, <span class="kw">_</span>) => Right(Right(x)), |
| }); |
| |
| <span class="macro">assert_eq!</span>(fizzbuzz, [<span class="number">15</span>]); |
| <span class="macro">assert_eq!</span>(fizz, [<span class="number">3</span>, <span class="number">6</span>, <span class="number">9</span>, <span class="number">12</span>, <span class="number">18</span>]); |
| <span class="macro">assert_eq!</span>(buzz, [<span class="number">5</span>, <span class="number">10</span>]); |
| <span class="macro">assert_eq!</span>(other, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>, <span class="number">7</span>, <span class="number">8</span>, <span class="number">11</span>, <span class="number">13</span>, <span class="number">14</span>, <span class="number">16</span>, <span class="number">17</span>, <span class="number">19</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.intersperse" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#2198-2203">source</a><h4 class="code-header">fn <a href="#method.intersperse" class="fnname">intersperse</a>(self, element: Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> <a class="struct" href="struct.Intersperse.html" title="struct rayon::iter::Intersperse">Intersperse</a><Self><span class="where fmt-newline">where<br> Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: Clone,</span></h4></section></summary><div class="docblock"><p>Intersperses clones of an element between items of this iterator.</p> |
| <h5 id="examples-49"><a href="#examples-49">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>x = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; |
| <span class="kw">let </span>r: Vec<<span class="kw">_</span>> = x.into_par_iter().intersperse(-<span class="number">1</span>).collect(); |
| |
| <span class="macro">assert_eq!</span>(r, <span class="macro">vec!</span>[<span class="number">1</span>, -<span class="number">1</span>, <span class="number">2</span>, -<span class="number">1</span>, <span class="number">3</span>]);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_any" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#2226-2228">source</a><h4 class="code-header">fn <a href="#method.take_any" class="fnname">take_any</a>(self, n: usize) -> <a class="struct" href="struct.TakeAny.html" title="struct rayon::iter::TakeAny">TakeAny</a><Self></h4></section></summary><div class="docblock"><p>Creates an iterator that yields <code>n</code> elements from <em>anywhere</em> in the original iterator.</p> |
| <p>This is similar to <a href="trait.IndexedParallelIterator.html#method.take" title="IndexedParallelIterator::take"><code>IndexedParallelIterator::take</code></a> without being |
| constrained to the “first” <code>n</code> of the original iterator order. The |
| taken items will still maintain their relative order where that is |
| visible in <code>collect</code>, <code>reduce</code>, and similar outputs.</p> |
| <h5 id="examples-50"><a href="#examples-50">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>result: Vec<<span class="kw">_</span>> = (<span class="number">0</span>..<span class="number">100</span>) |
| .into_par_iter() |
| .filter(|<span class="kw-2">&</span>x| x % <span class="number">2 </span>== <span class="number">0</span>) |
| .take_any(<span class="number">5</span>) |
| .collect(); |
| |
| <span class="macro">assert_eq!</span>(result.len(), <span class="number">5</span>); |
| <span class="macro">assert!</span>(result.windows(<span class="number">2</span>).all(|w| w[<span class="number">0</span>] < w[<span class="number">1</span>]));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.skip_any" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#2251-2253">source</a><h4 class="code-header">fn <a href="#method.skip_any" class="fnname">skip_any</a>(self, n: usize) -> <a class="struct" href="struct.SkipAny.html" title="struct rayon::iter::SkipAny">SkipAny</a><Self></h4></section></summary><div class="docblock"><p>Creates an iterator that skips <code>n</code> elements from <em>anywhere</em> in the original iterator.</p> |
| <p>This is similar to <a href="trait.IndexedParallelIterator.html#method.skip" title="IndexedParallelIterator::skip"><code>IndexedParallelIterator::skip</code></a> without being |
| constrained to the “first” <code>n</code> of the original iterator order. The |
| remaining items will still maintain their relative order where that is |
| visible in <code>collect</code>, <code>reduce</code>, and similar outputs.</p> |
| <h5 id="examples-51"><a href="#examples-51">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>result: Vec<<span class="kw">_</span>> = (<span class="number">0</span>..<span class="number">100</span>) |
| .into_par_iter() |
| .filter(|<span class="kw-2">&</span>x| x % <span class="number">2 </span>== <span class="number">0</span>) |
| .skip_any(<span class="number">5</span>) |
| .collect(); |
| |
| <span class="macro">assert_eq!</span>(result.len(), <span class="number">45</span>); |
| <span class="macro">assert!</span>(result.windows(<span class="number">2</span>).all(|w| w[<span class="number">0</span>] < w[<span class="number">1</span>]));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_any_while" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#2301-2306">source</a><h4 class="code-header">fn <a href="#method.take_any_while" class="fnname">take_any_while</a><P>(self, predicate: P) -> <a class="struct" href="struct.TakeAnyWhile.html" title="struct rayon::iter::TakeAnyWhile">TakeAnyWhile</a><Self, P><span class="where fmt-newline">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Creates an iterator that takes elements from <em>anywhere</em> in the original iterator |
| until the given <code>predicate</code> returns <code>false</code>.</p> |
| <p>The <code>predicate</code> may be anything – e.g. it could be checking a fact about the item, a |
| global condition unrelated to the item itself, or some combination thereof.</p> |
| <p>If parallel calls to the <code>predicate</code> race and give different results, then the |
| <code>true</code> results will still take those particular items, while respecting the <code>false</code> |
| result from elsewhere to skip any further items.</p> |
| <p>This is similar to [<code>Iterator::take_while</code>] without being constrained to the original |
| iterator order. The taken items will still maintain their relative order where that is |
| visible in <code>collect</code>, <code>reduce</code>, and similar outputs.</p> |
| <h5 id="examples-52"><a href="#examples-52">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>result: Vec<<span class="kw">_</span>> = (<span class="number">0</span>..<span class="number">100</span>) |
| .into_par_iter() |
| .take_any_while(|x| <span class="kw-2">*</span>x < <span class="number">50</span>) |
| .collect(); |
| |
| <span class="macro">assert!</span>(result.len() <= <span class="number">50</span>); |
| <span class="macro">assert!</span>(result.windows(<span class="number">2</span>).all(|w| w[<span class="number">0</span>] < w[<span class="number">1</span>]));</code></pre></div> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| <span class="kw">use </span>std::sync::atomic::AtomicUsize; |
| <span class="kw">use </span>std::sync::atomic::Ordering::Relaxed; |
| |
| <span class="comment">// Collect any group of items that sum <= 1000 |
| </span><span class="kw">let </span>quota = AtomicUsize::new(<span class="number">1000</span>); |
| <span class="kw">let </span>result: Vec<<span class="kw">_</span>> = (<span class="number">0_usize</span>..<span class="number">100</span>) |
| .into_par_iter() |
| .take_any_while(|<span class="kw-2">&</span>x| { |
| quota.fetch_update(Relaxed, Relaxed, |q| q.checked_sub(x)) |
| .is_ok() |
| }) |
| .collect(); |
| |
| <span class="kw">let </span>sum = result.iter().sum::<usize>(); |
| <span class="macro">assert!</span>(<span class="macro">matches!</span>(sum, <span class="number">902</span>..=<span class="number">1000</span>));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.skip_any_while" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#2335-2340">source</a><h4 class="code-header">fn <a href="#method.skip_any_while" class="fnname">skip_any_while</a><P>(self, predicate: P) -> <a class="struct" href="struct.SkipAnyWhile.html" title="struct rayon::iter::SkipAnyWhile">SkipAnyWhile</a><Self, P><span class="where fmt-newline">where<br> P: Fn(&Self::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h4></section></summary><div class="docblock"><p>Creates an iterator that skips elements from <em>anywhere</em> in the original iterator |
| until the given <code>predicate</code> returns <code>false</code>.</p> |
| <p>The <code>predicate</code> may be anything – e.g. it could be checking a fact about the item, a |
| global condition unrelated to the item itself, or some combination thereof.</p> |
| <p>If parallel calls to the <code>predicate</code> race and give different results, then the |
| <code>true</code> results will still skip those particular items, while respecting the <code>false</code> |
| result from elsewhere to skip any further items.</p> |
| <p>This is similar to [<code>Iterator::skip_while</code>] without being constrained to the original |
| iterator order. The remaining items will still maintain their relative order where that is |
| visible in <code>collect</code>, <code>reduce</code>, and similar outputs.</p> |
| <h5 id="examples-53"><a href="#examples-53">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>; |
| |
| <span class="kw">let </span>result: Vec<<span class="kw">_</span>> = (<span class="number">0</span>..<span class="number">100</span>) |
| .into_par_iter() |
| .skip_any_while(|x| <span class="kw-2">*</span>x < <span class="number">50</span>) |
| .collect(); |
| |
| <span class="macro">assert!</span>(result.len() >= <span class="number">50</span>); |
| <span class="macro">assert!</span>(result.windows(<span class="number">2</span>).all(|w| w[<span class="number">0</span>] < w[<span class="number">1</span>]));</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.opt_len" class="method has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/mod.rs.html#2372-2374">source</a><h4 class="code-header">fn <a href="#method.opt_len" class="fnname">opt_len</a>(&self) -> Option<usize></h4></section></summary><div class="docblock"><p>Internal method used to define the behavior of this parallel |
| iterator. You should not need to call this directly.</p> |
| <p>Returns the number of items produced by this iterator, if known |
| statically. This can be used by consumers to trigger special fast |
| paths. Therefore, if <code>Some(_)</code> is returned, this iterator must only |
| use the (indexed) <code>Consumer</code> methods when driving a consumer, such |
| as <code>split_at()</code>. Calling <code>UnindexedConsumer::split_off_left()</code> or |
| other <code>UnindexedConsumer</code> methods – or returning an inaccurate |
| value – may result in panics.</p> |
| <p>This method is currently used to optimize <code>collect</code> for want |
| of true Rust specialization; it may be removed when |
| specialization is stable.</p> |
| </div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3Cchar%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/range.rs.html#323-336">source</a><a href="#impl-ParallelIterator-for-Iter%3Cchar%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::range::<a class="struct" href="../range/struct.Iter.html" title="struct rayon::range::Iter">Iter</a><char></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-1" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = char</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3Cchar%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/range_inclusive.rs.html#265-278">source</a><a href="#impl-ParallelIterator-for-Iter%3Cchar%3E-1" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::range_inclusive::<a class="struct" href="../range_inclusive/struct.Iter.html" title="struct rayon::range_inclusive::Iter">Iter</a><char></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-2" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = char</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Drain%3C%27a%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/string.rs.html#30-41">source</a><a href="#impl-ParallelIterator-for-Drain%3C%27a%3E" class="anchor"></a><h3 class="code-header">impl<'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::string::<a class="struct" href="../string/struct.Drain.html" title="struct rayon::string::Drain">Drain</a><'a></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-3" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = char</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IterMut%3C%27a%2C%20K%2C%20V%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/hash_map.rs.html#65-68">source</a><a href="#impl-ParallelIterator-for-IterMut%3C%27a%2C%20K%2C%20V%3E" class="anchor"></a><h3 class="code-header">impl<'a, K: Hash + Eq + Sync + 'a, V: Send + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::hash_map::<a class="struct" href="../collections/hash_map/struct.IterMut.html" title="struct rayon::collections::hash_map::IterMut">IterMut</a><'a, K, V></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-4" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-4" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (&'a K, &'a mut V)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3C%27a%2C%20K%2C%20V%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/hash_map.rs.html#49-52">source</a><a href="#impl-ParallelIterator-for-Iter%3C%27a%2C%20K%2C%20V%3E" class="anchor"></a><h3 class="code-header">impl<'a, K: Hash + Eq + Sync + 'a, V: Sync + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::hash_map::<a class="struct" href="../collections/hash_map/struct.Iter.html" title="struct rayon::collections::hash_map::Iter">Iter</a><'a, K, V></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-5" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-5" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (&'a K, &'a V)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IterMut%3C%27a%2C%20K%2C%20V%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/btree_map.rs.html#63-66">source</a><a href="#impl-ParallelIterator-for-IterMut%3C%27a%2C%20K%2C%20V%3E-1" class="anchor"></a><h3 class="code-header">impl<'a, K: Ord + Sync + 'a, V: Send + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::btree_map::<a class="struct" href="../collections/btree_map/struct.IterMut.html" title="struct rayon::collections::btree_map::IterMut">IterMut</a><'a, K, V></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-6" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-6" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (&'a K, &'a mut V)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3C%27a%2C%20K%2C%20V%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/btree_map.rs.html#47-50">source</a><a href="#impl-ParallelIterator-for-Iter%3C%27a%2C%20K%2C%20V%3E-1" class="anchor"></a><h3 class="code-header">impl<'a, K: Ord + Sync + 'a, V: Sync + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::btree_map::<a class="struct" href="../collections/btree_map/struct.Iter.html" title="struct rayon::collections::btree_map::Iter">Iter</a><'a, K, V></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-7" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-7" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (&'a K, &'a V)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Cloned%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/cloned.rs.html#28-46">source</a><a href="#impl-ParallelIterator-for-Cloned%3CI%3E" class="anchor"></a><h3 class="code-header">impl<'a, T, I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Cloned.html" title="struct rayon::iter::Cloned">Cloned</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = &'a T>,<br> T: 'a + Clone + Send + Sync,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-8" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-8" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Copied%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/copied.rs.html#28-46">source</a><a href="#impl-ParallelIterator-for-Copied%3CI%3E" class="anchor"></a><h3 class="code-header">impl<'a, T, I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Copied.html" title="struct rayon::iter::Copied">Copied</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = &'a T>,<br> T: 'a + Copy + Send + Sync,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-9" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-9" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/hash_set.rs.html#49-52">source</a><a href="#impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T: Hash + Eq + Sync + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::hash_set::<a class="struct" href="../collections/hash_set/struct.Iter.html" title="struct rayon::collections::hash_set::Iter">Iter</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-10" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-10" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'a T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Drain%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/binary_heap.rs.html#76-89">source</a><a href="#impl-ParallelIterator-for-Drain%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T: Ord + Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::binary_heap::<a class="struct" href="../collections/binary_heap/struct.Drain.html" title="struct rayon::collections::binary_heap::Drain">Drain</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-11" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-11" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/binary_heap.rs.html#53-56">source</a><a href="#impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-1" class="anchor"></a><h3 class="code-header">impl<'a, T: Ord + Sync + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::binary_heap::<a class="struct" href="../collections/binary_heap/struct.Iter.html" title="struct rayon::collections::binary_heap::Iter">Iter</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-12" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-12" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'a T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-2" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/btree_set.rs.html#47-50">source</a><a href="#impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-2" class="anchor"></a><h3 class="code-header">impl<'a, T: Ord + Sync + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::btree_set::<a class="struct" href="../collections/btree_set/struct.Iter.html" title="struct rayon::collections::btree_set::Iter">Iter</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-13" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-13" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'a T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IterMut%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/linked_list.rs.html#63-66">source</a><a href="#impl-ParallelIterator-for-IterMut%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T: Send + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::linked_list::<a class="struct" href="../collections/linked_list/struct.IterMut.html" title="struct rayon::collections::linked_list::IterMut">IterMut</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-14" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-14" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'a mut T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IterMut%3C%27a%2C%20T%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/vec_deque.rs.html#86-89">source</a><a href="#impl-ParallelIterator-for-IterMut%3C%27a%2C%20T%3E-1" class="anchor"></a><h3 class="code-header">impl<'a, T: Send + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::vec_deque::<a class="struct" href="../collections/vec_deque/struct.IterMut.html" title="struct rayon::collections::vec_deque::IterMut">IterMut</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-15" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-15" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'a mut T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IterMut%3C%27a%2C%20T%3E-2" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/option.rs.html#140-143">source</a><a href="#impl-ParallelIterator-for-IterMut%3C%27a%2C%20T%3E-2" class="anchor"></a><h3 class="code-header">impl<'a, T: Send + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::option::<a class="struct" href="../option/struct.IterMut.html" title="struct rayon::option::IterMut">IterMut</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-16" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-16" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'a mut T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IterMut%3C%27a%2C%20T%3E-3" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/result.rs.html#83-86">source</a><a href="#impl-ParallelIterator-for-IterMut%3C%27a%2C%20T%3E-3" class="anchor"></a><h3 class="code-header">impl<'a, T: Send + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::result::<a class="struct" href="../result/struct.IterMut.html" title="struct rayon::result::IterMut">IterMut</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-17" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-17" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'a mut T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Drain%3C%27a%2C%20T%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/vec_deque.rs.html#113-126">source</a><a href="#impl-ParallelIterator-for-Drain%3C%27a%2C%20T%3E-1" class="anchor"></a><h3 class="code-header">impl<'a, T: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::vec_deque::<a class="struct" href="../collections/vec_deque/struct.Drain.html" title="struct rayon::collections::vec_deque::Drain">Drain</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-18" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-18" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-3" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/linked_list.rs.html#47-50">source</a><a href="#impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-3" class="anchor"></a><h3 class="code-header">impl<'a, T: Sync + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::linked_list::<a class="struct" href="../collections/linked_list/struct.Iter.html" title="struct rayon::collections::linked_list::Iter">Iter</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-19" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-19" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'a T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-4" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/vec_deque.rs.html#63-66">source</a><a href="#impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-4" class="anchor"></a><h3 class="code-header">impl<'a, T: Sync + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::vec_deque::<a class="struct" href="../collections/vec_deque/struct.Iter.html" title="struct rayon::collections::vec_deque::Iter">Iter</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-20" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-20" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'a T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-5" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/option.rs.html#110-113">source</a><a href="#impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-5" class="anchor"></a><h3 class="code-header">impl<'a, T: Sync + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::option::<a class="struct" href="../option/struct.Iter.html" title="struct rayon::option::Iter">Iter</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-21" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-21" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'a T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-6" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/result.rs.html#61-64">source</a><a href="#impl-ParallelIterator-for-Iter%3C%27a%2C%20T%3E-6" class="anchor"></a><h3 class="code-header">impl<'a, T: Sync + 'a> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::result::<a class="struct" href="../result/struct.Iter.html" title="struct rayon::result::Iter">Iter</a><'a, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-22" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-22" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'a T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Bytes%3C%27ch%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/str.rs.html#481-490">source</a><a href="#impl-ParallelIterator-for-Bytes%3C%27ch%3E" class="anchor"></a><h3 class="code-header">impl<'ch> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../str/struct.Bytes.html" title="struct rayon::str::Bytes">Bytes</a><'ch></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-23" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-23" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = u8</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-CharIndices%3C%27ch%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/str.rs.html#426-439">source</a><a href="#impl-ParallelIterator-for-CharIndices%3C%27ch%3E" class="anchor"></a><h3 class="code-header">impl<'ch> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../str/struct.CharIndices.html" title="struct rayon::str::CharIndices">CharIndices</a><'ch></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-24" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-24" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (usize, char)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Chars%3C%27ch%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/str.rs.html#381-390">source</a><a href="#impl-ParallelIterator-for-Chars%3C%27ch%3E" class="anchor"></a><h3 class="code-header">impl<'ch> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../str/struct.Chars.html" title="struct rayon::str::Chars">Chars</a><'ch></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-25" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-25" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = char</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-EncodeUtf16%3C%27ch%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/str.rs.html#525-534">source</a><a href="#impl-ParallelIterator-for-EncodeUtf16%3C%27ch%3E" class="anchor"></a><h3 class="code-header">impl<'ch> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../str/struct.EncodeUtf16.html" title="struct rayon::str::EncodeUtf16">EncodeUtf16</a><'ch></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-26" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-26" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = u16</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Lines%3C%27ch%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/str.rs.html#695-707">source</a><a href="#impl-ParallelIterator-for-Lines%3C%27ch%3E" class="anchor"></a><h3 class="code-header">impl<'ch> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../str/struct.Lines.html" title="struct rayon::str::Lines">Lines</a><'ch></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-27" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-27" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'ch str</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-SplitWhitespace%3C%27ch%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/str.rs.html#720-732">source</a><a href="#impl-ParallelIterator-for-SplitWhitespace%3C%27ch%3E" class="anchor"></a><h3 class="code-header">impl<'ch> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../str/struct.SplitWhitespace.html" title="struct rayon::str::SplitWhitespace">SplitWhitespace</a><'ch></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-28" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-28" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'ch str</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MatchIndices%3C%27ch%2C%20P%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/str.rs.html#805-819">source</a><a href="#impl-ParallelIterator-for-MatchIndices%3C%27ch%2C%20P%3E" class="anchor"></a><h3 class="code-header">impl<'ch, P: Pattern> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../str/struct.MatchIndices.html" title="struct rayon::str::MatchIndices">MatchIndices</a><'ch, P></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-29" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-29" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (usize, &'ch str)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Matches%3C%27ch%2C%20P%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/str.rs.html#748-761">source</a><a href="#impl-ParallelIterator-for-Matches%3C%27ch%2C%20P%3E" class="anchor"></a><h3 class="code-header">impl<'ch, P: Pattern> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../str/struct.Matches.html" title="struct rayon::str::Matches">Matches</a><'ch, P></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-30" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-30" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'ch str</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Split%3C%27ch%2C%20P%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/str.rs.html#572-582">source</a><a href="#impl-ParallelIterator-for-Split%3C%27ch%2C%20P%3E" class="anchor"></a><h3 class="code-header">impl<'ch, P: Pattern> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::str::<a class="struct" href="../str/struct.Split.html" title="struct rayon::str::Split">Split</a><'ch, P></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-31" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-31" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'ch str</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-SplitTerminator%3C%27ch%2C%20P%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/str.rs.html#647-657">source</a><a href="#impl-ParallelIterator-for-SplitTerminator%3C%27ch%2C%20P%3E" class="anchor"></a><h3 class="code-header">impl<'ch, P: Pattern> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../str/struct.SplitTerminator.html" title="struct rayon::str::SplitTerminator">SplitTerminator</a><'ch, P></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-32" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-32" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'ch str</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Split%3C%27data%2C%20T%2C%20P%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/mod.rs.html#919-933">source</a><a href="#impl-ParallelIterator-for-Split%3C%27data%2C%20T%2C%20P%3E" class="anchor"></a><h3 class="code-header">impl<'data, T, P> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::slice::<a class="struct" href="../slice/struct.Split.html" title="struct rayon::slice::Split">Split</a><'data, T, P><span class="where fmt-newline">where<br> P: Fn(&T) -> bool + Sync + Send,<br> T: Sync,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-33" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-33" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data [T]</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-SplitMut%3C%27data%2C%20T%2C%20P%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/mod.rs.html#988-1002">source</a><a href="#impl-ParallelIterator-for-SplitMut%3C%27data%2C%20T%2C%20P%3E" class="anchor"></a><h3 class="code-header">impl<'data, T, P> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../slice/struct.SplitMut.html" title="struct rayon::slice::SplitMut">SplitMut</a><'data, T, P><span class="where fmt-newline">where<br> P: Fn(&T) -> bool + Sync + Send,<br> T: Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-34" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-34" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data mut [T]</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-ChunksExactMut%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/chunks.rs.html#324-337">source</a><a href="#impl-ParallelIterator-for-ChunksExactMut%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Send + 'data> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../slice/struct.ChunksExactMut.html" title="struct rayon::slice::ChunksExactMut">ChunksExactMut</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-35" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-35" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data mut [T]</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-ChunksMut%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/chunks.rs.html#206-219">source</a><a href="#impl-ParallelIterator-for-ChunksMut%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Send + 'data> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../slice/struct.ChunksMut.html" title="struct rayon::slice::ChunksMut">ChunksMut</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-36" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-36" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data mut [T]</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IterMut%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/mod.rs.html#842-855">source</a><a href="#impl-ParallelIterator-for-IterMut%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Send + 'data> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::slice::<a class="struct" href="../slice/struct.IterMut.html" title="struct rayon::slice::IterMut">IterMut</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-37" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-37" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data mut T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-RChunksExactMut%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/rchunks.rs.html#321-334">source</a><a href="#impl-ParallelIterator-for-RChunksExactMut%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Send + 'data> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../slice/struct.RChunksExactMut.html" title="struct rayon::slice::RChunksExactMut">RChunksExactMut</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-38" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-38" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data mut [T]</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-RChunksMut%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/rchunks.rs.html#204-217">source</a><a href="#impl-ParallelIterator-for-RChunksMut%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Send + 'data> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../slice/struct.RChunksMut.html" title="struct rayon::slice::RChunksMut">RChunksMut</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-39" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-39" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data mut [T]</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Drain%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/vec.rs.html#108-121">source</a><a href="#impl-ParallelIterator-for-Drain%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::vec::<a class="struct" href="../vec/struct.Drain.html" title="struct rayon::vec::Drain">Drain</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-40" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-40" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Chunks%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/chunks.rs.html#25-38">source</a><a href="#impl-ParallelIterator-for-Chunks%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Sync + 'data> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::slice::<a class="struct" href="../slice/struct.Chunks.html" title="struct rayon::slice::Chunks">Chunks</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-41" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-41" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data [T]</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-ChunksExact%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/chunks.rs.html#126-139">source</a><a href="#impl-ParallelIterator-for-ChunksExact%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Sync + 'data> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../slice/struct.ChunksExact.html" title="struct rayon::slice::ChunksExact">ChunksExact</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-42" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-42" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data [T]</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/mod.rs.html#701-714">source</a><a href="#impl-ParallelIterator-for-Iter%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Sync + 'data> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::slice::<a class="struct" href="../slice/struct.Iter.html" title="struct rayon::slice::Iter">Iter</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-43" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-43" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-RChunks%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/rchunks.rs.html#24-37">source</a><a href="#impl-ParallelIterator-for-RChunks%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Sync + 'data> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../slice/struct.RChunks.html" title="struct rayon::slice::RChunks">RChunks</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-44" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-44" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data [T]</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-RChunksExact%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/rchunks.rs.html#124-137">source</a><a href="#impl-ParallelIterator-for-RChunksExact%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Sync + 'data> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../slice/struct.RChunksExact.html" title="struct rayon::slice::RChunksExact">RChunksExact</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-45" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-45" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data [T]</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Windows%3C%27data%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/slice/mod.rs.html#767-780">source</a><a href="#impl-ParallelIterator-for-Windows%3C%27data%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'data, T: Sync + 'data> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="../slice/struct.Windows.html" title="struct rayon::slice::Windows">Windows</a><'data, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-46" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-46" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = &'data [T]</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C)%3E" class="anchor"></a><h3 class="code-header">impl<A> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A,)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-47" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-47" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>,)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Chain%3CA%2C%20B%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/chain.rs.html#34-65">source</a><a href="#impl-ParallelIterator-for-Chain%3CA%2C%20B%3E" class="anchor"></a><h3 class="code-header">impl<A, B> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Chain.html" title="struct rayon::iter::Chain">Chain</a><A, B><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> B: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = A::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-48" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-48" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C%20B)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C%20B)%3E" class="anchor"></a><h3 class="code-header">impl<A, B> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A, B)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-49" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-49" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Zip%3CA%2C%20B%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/zip.rs.html#30-47">source</a><a href="#impl-ParallelIterator-for-Zip%3CA%2C%20B%3E" class="anchor"></a><h3 class="code-header">impl<A, B> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Zip.html" title="struct rayon::iter::Zip">Zip</a><A, B><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-50" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-50" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-ZipEq%3CA%2C%20B%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/zip_eq.rs.html#31-48">source</a><a href="#impl-ParallelIterator-for-ZipEq%3CA%2C%20B%3E" class="anchor"></a><h3 class="code-header">impl<A, B> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.ZipEq.html" title="struct rayon::iter::ZipEq">ZipEq</a><A, B><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-51" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-51" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C)%3E" class="anchor"></a><h3 class="code-header">impl<A, B, C> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A, B, C)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> C: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-52" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-52" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <C as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D)%3E" class="anchor"></a><h3 class="code-header">impl<A, B, C, D> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A, B, C, D)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> C: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> D: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-53" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-53" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <C as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <D as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E)%3E" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A, B, C, D, E)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> C: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> D: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> E: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-54" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-54" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <C as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <D as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <E as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F)%3E" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A, B, C, D, E, F)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> C: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> D: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> E: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> F: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-55" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-55" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <C as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <D as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <E as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <F as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G)%3E" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A, B, C, D, E, F, G)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> C: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> D: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> E: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> F: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> G: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-56" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-56" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <C as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <D as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <E as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <F as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <G as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H)%3E" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A, B, C, D, E, F, G, H)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> C: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> D: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> E: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> F: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> G: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> H: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-57" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-57" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <C as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <D as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <E as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <F as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <G as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <H as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I)%3E" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A, B, C, D, E, F, G, H, I)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> C: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> D: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> E: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> F: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> G: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> H: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-58" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-58" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <C as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <D as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <E as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <F as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <G as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <H as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J)%3E" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A, B, C, D, E, F, G, H, I, J)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> C: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> D: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> E: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> F: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> G: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> H: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> J: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-59" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-59" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <C as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <D as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <E as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <F as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <G as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <H as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <J as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K)%3E" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J, K> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A, B, C, D, E, F, G, H, I, J, K)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> C: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> D: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> E: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> F: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> G: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> H: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> J: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> K: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-60" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-60" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <C as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <D as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <E as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <F as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <G as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <H as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <J as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <K as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K%2C%20L)%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/multizip.rs.html#235-338">source</a><a href="#impl-ParallelIterator-for-MultiZip%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K%2C%20L)%3E" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J, K, L> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">MultiZip</a><(A, B, C, D, E, F, G, H, I, J, K, L)><span class="where fmt-newline">where<br> A: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> B: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> C: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> D: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> E: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> F: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> G: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> H: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> J: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> K: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> L: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-61" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-61" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<A as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <B as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <C as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <D as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <E as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <F as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <G as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <H as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <J as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <K as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, <L as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Split%3CD%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/splitter.rs.html#130-147">source</a><a href="#impl-ParallelIterator-for-Split%3CD%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<D, S> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::iter::<a class="struct" href="struct.Split.html" title="struct rayon::iter::Split">Split</a><D, S><span class="where fmt-newline">where<br> D: Send,<br> S: Fn(D) -> (D, Option<D>) + Sync + Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-62" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-62" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = D</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Chunks%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/chunks.rs.html#33-49">source</a><a href="#impl-ParallelIterator-for-Chunks%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::iter::<a class="struct" href="struct.Chunks.html" title="struct rayon::iter::Chunks">Chunks</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-63" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-63" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = Vec<<I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>, Global></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Enumerate%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/enumerate.rs.html#28-44">source</a><a href="#impl-ParallelIterator-for-Enumerate%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Enumerate.html" title="struct rayon::iter::Enumerate">Enumerate</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-64" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-64" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (usize, <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Flatten%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/flatten.rs.html#26-40">source</a><a href="#impl-ParallelIterator-for-Flatten%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Flatten.html" title="struct rayon::iter::Flatten">Flatten</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-65" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-65" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <<I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> as <a class="trait" href="trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>>::<a class="associatedtype" href="trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-FlattenIter%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/flatten_iter.rs.html#27-42">source</a><a href="#impl-ParallelIterator-for-FlattenIter%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.FlattenIter.html" title="struct rayon::iter::FlattenIter">FlattenIter</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: IntoIterator,<br> <I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> as IntoIterator>::Item: Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-66" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-66" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <<I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a> as IntoIterator>::Item</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Intersperse%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/intersperse.rs.html#34-55">source</a><a href="#impl-ParallelIterator-for-Intersperse%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Intersperse.html" title="struct rayon::iter::Intersperse">Intersperse</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: Clone + Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-67" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-67" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MaxLen%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/len.rs.html#161-177">source</a><a href="#impl-ParallelIterator-for-MaxLen%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MaxLen.html" title="struct rayon::iter::MaxLen">MaxLen</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-68" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-68" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MinLen%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/len.rs.html#27-43">source</a><a href="#impl-ParallelIterator-for-MinLen%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MinLen.html" title="struct rayon::iter::MinLen">MinLen</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-69" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-69" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-PanicFuse%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/panic_fuse.rs.html#49-70">source</a><a href="#impl-ParallelIterator-for-PanicFuse%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.PanicFuse.html" title="struct rayon::iter::PanicFuse">PanicFuse</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-70" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-70" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Rev%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/rev.rs.html#26-42">source</a><a href="#impl-ParallelIterator-for-Rev%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Rev.html" title="struct rayon::iter::Rev">Rev</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-71" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-71" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Skip%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/skip.rs.html#29-45">source</a><a href="#impl-ParallelIterator-for-Skip%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Skip.html" title="struct rayon::iter::Skip">Skip</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-72" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-72" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-SkipAny%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/skip_any.rs.html#27-43">source</a><a href="#impl-ParallelIterator-for-SkipAny%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.SkipAny.html" title="struct rayon::iter::SkipAny">SkipAny</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-73" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-73" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-StepBy%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/step_by.rs.html#31-47">source</a><a href="#impl-ParallelIterator-for-StepBy%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.StepBy.html" title="struct rayon::iter::StepBy">StepBy</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-74" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-74" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Take%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/take.rs.html#28-44">source</a><a href="#impl-ParallelIterator-for-Take%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Take.html" title="struct rayon::iter::Take">Take</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-75" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-75" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-TakeAny%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/take_any.rs.html#27-43">source</a><a href="#impl-ParallelIterator-for-TakeAny%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.TakeAny.html" title="struct rayon::iter::TakeAny">TakeAny</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-76" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-76" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Inspect%3CI%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/inspect.rs.html#37-55">source</a><a href="#impl-ParallelIterator-for-Inspect%3CI%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<I, F> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Inspect.html" title="struct rayon::iter::Inspect">Inspect</a><I, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> F: Fn(&I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Sync + Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-77" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-77" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Update%3CI%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/update.rs.html#36-54">source</a><a href="#impl-ParallelIterator-for-Update%3CI%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<I, F> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Update.html" title="struct rayon::iter::Update">Update</a><I, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> F: Fn(&mut I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) + Send + Sync,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-78" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-78" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-FlatMap%3CI%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/flat_map.rs.html#31-46">source</a><a href="#impl-ParallelIterator-for-FlatMap%3CI%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<I, F, PI> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.FlatMap.html" title="struct rayon::iter::FlatMap">FlatMap</a><I, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> F: Fn(I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> PI + Sync + Send,<br> PI: <a class="trait" href="trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-79" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-79" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <PI as <a class="trait" href="trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>>::<a class="associatedtype" href="trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Map%3CI%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/map.rs.html#36-55">source</a><a href="#impl-ParallelIterator-for-Map%3CI%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<I, F, R> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Map.html" title="struct rayon::iter::Map">Map</a><I, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> F: Fn(I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> R: Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-80" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-80" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <F as FnOnce(<I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>)>::Output</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-FlatMapIter%3CI%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/flat_map_iter.rs.html#33-49">source</a><a href="#impl-ParallelIterator-for-FlatMapIter%3CI%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<I, F, SI> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.FlatMapIter.html" title="struct rayon::iter::FlatMapIter">FlatMapIter</a><I, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> F: Fn(I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> SI + Sync + Send,<br> SI: IntoIterator,<br> SI::Item: Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-81" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-81" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <SI as IntoIterator>::Item</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-FoldChunks%3CI%2C%20ID%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/fold_chunks.rs.html#54-73">source</a><a href="#impl-ParallelIterator-for-FoldChunks%3CI%2C%20ID%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<I, ID, U, F> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.FoldChunks.html" title="struct rayon::iter::FoldChunks">FoldChunks</a><I, ID, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> ID: Fn() -> U + Send + Sync,<br> F: Fn(U, I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> U + Send + Sync,<br> U: Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-82" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-82" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = U</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MapInit%3CI%2C%20INIT%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/map_with.rs.html#368-388">source</a><a href="#impl-ParallelIterator-for-MapInit%3CI%2C%20INIT%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<I, INIT, T, F, R> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MapInit.html" title="struct rayon::iter::MapInit">MapInit</a><I, INIT, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> INIT: Fn() -> T + Sync + Send,<br> F: Fn(&mut T, I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> R: Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-83" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-83" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = R</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Interleave%3CI%2C%20J%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/interleave.rs.html#34-51">source</a><a href="#impl-ParallelIterator-for-Interleave%3CI%2C%20J%3E" class="anchor"></a><h3 class="code-header">impl<I, J> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Interleave.html" title="struct rayon::iter::Interleave">Interleave</a><I, J><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> J: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a><Item = I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-84" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-84" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-InterleaveShortest%3CI%2C%20J%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/interleave_shortest.rs.html#44-61">source</a><a href="#impl-ParallelIterator-for-InterleaveShortest%3CI%2C%20J%3E" class="anchor"></a><h3 class="code-header">impl<I, J> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.InterleaveShortest.html" title="struct rayon::iter::InterleaveShortest">InterleaveShortest</a><I, J><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> J: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a><Item = I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-85" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-85" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Filter%3CI%2C%20P%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/filter.rs.html#34-48">source</a><a href="#impl-ParallelIterator-for-Filter%3CI%2C%20P%3E" class="anchor"></a><h3 class="code-header">impl<I, P> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Filter.html" title="struct rayon::iter::Filter">Filter</a><I, P><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> P: Fn(&I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-86" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-86" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Positions%3CI%2C%20P%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/positions.rs.html#38-52">source</a><a href="#impl-ParallelIterator-for-Positions%3CI%2C%20P%3E" class="anchor"></a><h3 class="code-header">impl<I, P> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Positions.html" title="struct rayon::iter::Positions">Positions</a><I, P><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> P: Fn(I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-87" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-87" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = usize</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-SkipAnyWhile%3CI%2C%20P%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/skip_any_while.rs.html#37-55">source</a><a href="#impl-ParallelIterator-for-SkipAnyWhile%3CI%2C%20P%3E" class="anchor"></a><h3 class="code-header">impl<I, P> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.SkipAnyWhile.html" title="struct rayon::iter::SkipAnyWhile">SkipAnyWhile</a><I, P><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> P: Fn(&I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-88" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-88" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-TakeAnyWhile%3CI%2C%20P%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/take_any_while.rs.html#37-55">source</a><a href="#impl-ParallelIterator-for-TakeAnyWhile%3CI%2C%20P%3E" class="anchor"></a><h3 class="code-header">impl<I, P> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.TakeAnyWhile.html" title="struct rayon::iter::TakeAnyWhile">TakeAnyWhile</a><I, P><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> P: Fn(&I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> bool + Sync + Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-89" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-89" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-FilterMap%3CI%2C%20P%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/filter_map.rs.html#33-48">source</a><a href="#impl-ParallelIterator-for-FilterMap%3CI%2C%20P%3E" class="anchor"></a><h3 class="code-header">impl<I, P, R> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.FilterMap.html" title="struct rayon::iter::FilterMap">FilterMap</a><I, P><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> P: Fn(I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> Option<R> + Sync + Send,<br> R: Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-90" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-90" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = R</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-WhileSome%3CI%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/while_some.rs.html#28-46">source</a><a href="#impl-ParallelIterator-for-WhileSome%3CI%3E" class="anchor"></a><h3 class="code-header">impl<I, T> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.WhileSome.html" title="struct rayon::iter::WhileSome">WhileSome</a><I><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = Option<T>>,<br> T: Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-91" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-91" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-MapWith%3CI%2C%20T%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/map_with.rs.html#39-59">source</a><a href="#impl-ParallelIterator-for-MapWith%3CI%2C%20T%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<I, T, F, R> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.MapWith.html" title="struct rayon::iter::MapWith">MapWith</a><I, T, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> T: Send + Clone,<br> F: Fn(&mut T, I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> R + Sync + Send,<br> R: Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-92" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-92" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = R</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-FoldChunksWith%3CI%2C%20U%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/fold_chunks_with.rs.html#54-72">source</a><a href="#impl-ParallelIterator-for-FoldChunksWith%3CI%2C%20U%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<I, U, F> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.FoldChunksWith.html" title="struct rayon::iter::FoldChunksWith">FoldChunksWith</a><I, U, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> U: Send + Clone,<br> F: Fn(U, I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> U + Send + Sync,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-93" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-93" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = U</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IterBridge%3CIter%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/par_bridge.rs.html#68-90">source</a><a href="#impl-ParallelIterator-for-IterBridge%3CIter%3E" class="anchor"></a><h3 class="code-header">impl<Iter: Iterator + Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.IterBridge.html" title="struct rayon::iter::IterBridge">IterBridge</a><Iter><span class="where fmt-newline">where<br> Iter::Item: Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-94" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-94" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <Iter as Iterator>::Item</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Drain%3C%27_%2C%20K%2C%20V%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/hash_map.rs.html#93-96">source</a><a href="#impl-ParallelIterator-for-Drain%3C%27_%2C%20K%2C%20V%3E" class="anchor"></a><h3 class="code-header">impl<K: Hash + Eq + Send, V: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::hash_map::<a class="struct" href="../collections/hash_map/struct.Drain.html" title="struct rayon::collections::hash_map::Drain">Drain</a><'_, K, V></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-95" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-95" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (K, V)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IntoIter%3CK%2C%20V%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/hash_map.rs.html#25-28">source</a><a href="#impl-ParallelIterator-for-IntoIter%3CK%2C%20V%3E" class="anchor"></a><h3 class="code-header">impl<K: Hash + Eq + Send, V: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::hash_map::<a class="struct" href="../collections/hash_map/struct.IntoIter.html" title="struct rayon::collections::hash_map::IntoIter">IntoIter</a><K, V></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-96" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-96" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (K, V)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IntoIter%3CK%2C%20V%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/btree_map.rs.html#23-26">source</a><a href="#impl-ParallelIterator-for-IntoIter%3CK%2C%20V%3E-1" class="anchor"></a><h3 class="code-header">impl<K: Ord + Send, V: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::btree_map::<a class="struct" href="../collections/btree_map/struct.IntoIter.html" title="struct rayon::collections::btree_map::IntoIter">IntoIter</a><K, V></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-97" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-97" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (K, V)</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Either%3CL%2C%20R%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/par_either.rs.html#6-26">source</a><a href="#impl-ParallelIterator-for-Either%3CL%2C%20R%3E" class="anchor"></a><h3 class="code-header">impl<L, R> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="enum" href="enum.Either.html" title="enum rayon::iter::Either">Either</a><L, R><span class="where fmt-newline">where<br> L: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> R: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a><Item = L::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,</span></h3></section></summary><div class="docblock"><p><code>Either<L, R></code> is a parallel iterator if both <code>L</code> and <code>R</code> are parallel iterators.</p> |
| </div><div class="impl-items"><section id="associatedtype.Item-98" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-98" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <L as <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>>::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Repeat%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/repeat.rs.html#57-72">source</a><a href="#impl-ParallelIterator-for-Repeat%3CT%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Repeat.html" title="struct rayon::iter::Repeat">Repeat</a><T><span class="where fmt-newline">where<br> T: Clone + Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-99" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-99" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-RepeatN%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/repeat.rs.html#126-142">source</a><a href="#impl-ParallelIterator-for-RepeatN%3CT%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.RepeatN.html" title="struct rayon::iter::RepeatN">RepeatN</a><T><span class="where fmt-newline">where<br> T: Clone + Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-100" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-100" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Drain%3C%27_%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/hash_set.rs.html#77-80">source</a><a href="#impl-ParallelIterator-for-Drain%3C%27_%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T: Hash + Eq + Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::hash_set::<a class="struct" href="../collections/hash_set/struct.Drain.html" title="struct rayon::collections::hash_set::Drain">Drain</a><'_, T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-101" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-101" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IntoIter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/hash_set.rs.html#25-28">source</a><a href="#impl-ParallelIterator-for-IntoIter%3CT%3E" class="anchor"></a><h3 class="code-header">impl<T: Hash + Eq + Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::hash_set::<a class="struct" href="../collections/hash_set/struct.IntoIter.html" title="struct rayon::collections::hash_set::IntoIter">IntoIter</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-102" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-102" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IntoIter%3CT%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/binary_heap.rs.html#29-32">source</a><a href="#impl-ParallelIterator-for-IntoIter%3CT%3E-1" class="anchor"></a><h3 class="code-header">impl<T: Ord + Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::binary_heap::<a class="struct" href="../collections/binary_heap/struct.IntoIter.html" title="struct rayon::collections::binary_heap::IntoIter">IntoIter</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-103" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-103" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IntoIter%3CT%3E-2" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/btree_set.rs.html#23-26">source</a><a href="#impl-ParallelIterator-for-IntoIter%3CT%3E-2" class="anchor"></a><h3 class="code-header">impl<T: Ord + Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::btree_set::<a class="struct" href="../collections/btree_set/struct.IntoIter.html" title="struct rayon::collections::btree_set::IntoIter">IntoIter</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-104" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-104" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/range.rs.html#119-133">source</a><a href="#impl-ParallelIterator-for-Iter%3CT%3E" class="anchor"></a><h3 class="code-header">impl<T: RangeInteger> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::range::<a class="struct" href="../range/struct.Iter.html" title="struct rayon::range::Iter">Iter</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-105" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-105" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Iter%3CT%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/range_inclusive.rs.html#125-139">source</a><a href="#impl-ParallelIterator-for-Iter%3CT%3E-1" class="anchor"></a><h3 class="code-header">impl<T: RangeInteger> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::range_inclusive::<a class="struct" href="../range_inclusive/struct.Iter.html" title="struct rayon::range_inclusive::Iter">Iter</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-106" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-106" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IntoIter%3CT%3E-3" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/linked_list.rs.html#23-26">source</a><a href="#impl-ParallelIterator-for-IntoIter%3CT%3E-3" class="anchor"></a><h3 class="code-header">impl<T: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::linked_list::<a class="struct" href="../collections/linked_list/struct.IntoIter.html" title="struct rayon::collections::linked_list::IntoIter">IntoIter</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-107" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-107" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IntoIter%3CT%3E-4" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/collections/vec_deque.rs.html#32-35">source</a><a href="#impl-ParallelIterator-for-IntoIter%3CT%3E-4" class="anchor"></a><h3 class="code-header">impl<T: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::collections::vec_deque::<a class="struct" href="../collections/vec_deque/struct.IntoIter.html" title="struct rayon::collections::vec_deque::IntoIter">IntoIter</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-108" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-108" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IntoIter%3CT%3E-5" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/option.rs.html#35-48">source</a><a href="#impl-ParallelIterator-for-IntoIter%3CT%3E-5" class="anchor"></a><h3 class="code-header">impl<T: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::option::<a class="struct" href="../option/struct.IntoIter.html" title="struct rayon::option::IntoIter">IntoIter</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-109" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-109" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IntoIter%3CT%3E-6" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/result.rs.html#31-34">source</a><a href="#impl-ParallelIterator-for-IntoIter%3CT%3E-6" class="anchor"></a><h3 class="code-header">impl<T: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::result::<a class="struct" href="../result/struct.IntoIter.html" title="struct rayon::result::IntoIter">IntoIter</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-110" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-110" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IntoIter%3CT%3E-7" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/vec.rs.html#51-64">source</a><a href="#impl-ParallelIterator-for-IntoIter%3CT%3E-7" class="anchor"></a><h3 class="code-header">impl<T: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::vec::<a class="struct" href="../vec/struct.IntoIter.html" title="struct rayon::vec::IntoIter">IntoIter</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-111" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-111" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Empty%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/empty.rs.html#47-60">source</a><a href="#impl-ParallelIterator-for-Empty%3CT%3E" class="anchor"></a><h3 class="code-header">impl<T: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Empty.html" title="struct rayon::iter::Empty">Empty</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-112" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-112" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Once%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/once.rs.html#34-47">source</a><a href="#impl-ParallelIterator-for-Once%3CT%3E" class="anchor"></a><h3 class="code-header">impl<T: Send> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Once.html" title="struct rayon::iter::Once">Once</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-113" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-113" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-IntoIter%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/array.rs.html#47-60">source</a><a href="#impl-ParallelIterator-for-IntoIter%3CT%2C%20N%3E" class="anchor"></a><h3 class="code-header">impl<T: Send, const N: usize> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for rayon::array::<a class="struct" href="../array/struct.IntoIter.html" title="struct rayon::array::IntoIter">IntoIter</a><T, N></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-114" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-114" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-FoldWith%3CI%2C%20U%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/fold.rs.html#219-238">source</a><a href="#impl-ParallelIterator-for-FoldWith%3CI%2C%20U%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<U, I, F> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.FoldWith.html" title="struct rayon::iter::FoldWith">FoldWith</a><I, U, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> F: Fn(U, I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> U + Sync + Send,<br> U: Send + Clone,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-115" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-115" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = U</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-TryFoldWith%3CI%2C%20U%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/try_fold.rs.html#212-232">source</a><a href="#impl-ParallelIterator-for-TryFoldWith%3CI%2C%20U%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<U, I, F> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.TryFoldWith.html" title="struct rayon::iter::TryFoldWith">TryFoldWith</a><I, U, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> F: Fn(U::Output, I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> U + Sync + Send,<br> U: Try + Send,<br> U::Output: Clone + Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-116" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-116" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = U</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-Fold%3CI%2C%20ID%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/fold.rs.html#41-61">source</a><a href="#impl-ParallelIterator-for-Fold%3CI%2C%20ID%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<U, I, ID, F> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.Fold.html" title="struct rayon::iter::Fold">Fold</a><I, ID, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> F: Fn(U, I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> U + Sync + Send,<br> ID: Fn() -> U + Sync + Send,<br> U: Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-117" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-117" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = U</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ParallelIterator-for-TryFold%3CI%2C%20U%2C%20ID%2C%20F%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rayon/iter/try_fold.rs.html#46-67">source</a><a href="#impl-ParallelIterator-for-TryFold%3CI%2C%20U%2C%20ID%2C%20F%3E" class="anchor"></a><h3 class="code-header">impl<U, I, ID, F> <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a> for <a class="struct" href="struct.TryFold.html" title="struct rayon::iter::TryFold">TryFold</a><I, U, ID, F><span class="where fmt-newline">where<br> I: <a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">ParallelIterator</a>,<br> F: Fn(U::Output, I::<a class="associatedtype" href="trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> U + Sync + Send,<br> ID: Fn() -> U::Output + Sync + Send,<br> U: Try + Send,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Item-118" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-118" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = U</h4></section></div></details></div><script src="../../implementors/rayon/iter/trait.ParallelIterator.js" data-ignore-extern-crates="either" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rayon" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html> |