Adding large folders

This commit is contained in:
2026-02-26 12:00:21 -05:00
parent 5400d82acd
commit 49701c85ad
47332 changed files with 1942573 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.ExponentialBlocks.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.ExponentialBlocks.html">../../../rayon/iter/struct.ExponentialBlocks.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.ExponentialBlocks.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.UniformBlocks.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.UniformBlocks.html">../../../rayon/iter/struct.UniformBlocks.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.UniformBlocks.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Chain.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Chain.html">../../../rayon/iter/struct.Chain.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Chain.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Chunks.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Chunks.html">../../../rayon/iter/struct.Chunks.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Chunks.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Cloned.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Cloned.html">../../../rayon/iter/struct.Cloned.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Cloned.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Copied.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Copied.html">../../../rayon/iter/struct.Copied.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Copied.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/fn.empty.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/fn.empty.html">../../../rayon/iter/fn.empty.html</a>...</p>
<script>location.replace("../../../rayon/iter/fn.empty.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Empty.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Empty.html">../../../rayon/iter/struct.Empty.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Empty.html" + location.search + location.hash);</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Enumerate.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Enumerate.html">../../../rayon/iter/struct.Enumerate.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Enumerate.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Filter.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Filter.html">../../../rayon/iter/struct.Filter.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Filter.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.FilterMap.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.FilterMap.html">../../../rayon/iter/struct.FilterMap.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.FilterMap.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.FlatMap.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.FlatMap.html">../../../rayon/iter/struct.FlatMap.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.FlatMap.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.FlatMapIter.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.FlatMapIter.html">../../../rayon/iter/struct.FlatMapIter.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.FlatMapIter.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Flatten.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Flatten.html">../../../rayon/iter/struct.Flatten.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Flatten.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.FlattenIter.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.FlattenIter.html">../../../rayon/iter/struct.FlattenIter.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.FlattenIter.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,12 @@
<!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="Creates a parallel iterator that produces nothing."><title>empty in rayon::iter - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">empty</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">empty</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">rayon</a>::<wbr><a href="index.html">iter</a></div><h1>Function <span class="fn">empty</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/rayon/iter/empty.rs.html#24-28">Source</a> </span></div><pre class="rust item-decl"><code>pub fn empty&lt;T: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>&gt;() -&gt; <a class="struct" href="struct.Empty.html" title="struct rayon::iter::Empty">Empty</a>&lt;T&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a parallel iterator that produces nothing.</p>
<p>This admits no parallelism on its own, but it could be used for code that
deals with generic parallel iterators.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<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::empty;
<span class="kw">let </span>pi = (<span class="number">0</span>..<span class="number">1234</span>).into_par_iter()
.chain(empty())
.chain(<span class="number">1234</span>..<span class="number">10_000</span>);
<span class="macro">assert_eq!</span>(pi.count(), <span class="number">10_000</span>);</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,15 @@
<!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="Creates a parallel iterator that produces an element exactly once."><title>once in rayon::iter - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">once</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">once</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">rayon</a>::<wbr><a href="index.html">iter</a></div><h1>Function <span class="fn">once</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/rayon/iter/once.rs.html#24-26">Source</a> </span></div><pre class="rust item-decl"><code>pub fn once&lt;T: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>&gt;(item: T) -&gt; <a class="struct" href="struct.Once.html" title="struct rayon::iter::Once">Once</a>&lt;T&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a parallel iterator that produces an element exactly once.</p>
<p>This admits no parallelism on its own, but it could be chained to existing
parallel iterators to extend their contents, or otherwise used for any code
that deals with generic parallel iterators.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<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::once;
<span class="kw">let </span>pi = (<span class="number">0</span>..<span class="number">1234</span>).into_par_iter()
.chain(once(-<span class="number">1</span>))
.chain(<span class="number">1234</span>..<span class="number">10_000</span>);
<span class="macro">assert_eq!</span>(pi.clone().count(), <span class="number">10_001</span>);
<span class="macro">assert_eq!</span>(pi.clone().filter(|<span class="kw-2">&amp;</span>x| x &lt; <span class="number">0</span>).count(), <span class="number">1</span>);
<span class="macro">assert_eq!</span>(pi.position_any(|x| x &lt; <span class="number">0</span>), <span class="prelude-val">Some</span>(<span class="number">1234</span>));</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,10 @@
<!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="Creates a parallel iterator that endlessly repeats `element` (by cloning it). Note that this iterator has “infinite” length, so typically you would want to use `zip` or `take` or some other means to shorten it, or consider using the `repeat_n()` function instead."><title>repeat in rayon::iter - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">repeat</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">repeat</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">rayon</a>::<wbr><a href="index.html">iter</a></div><h1>Function <span class="fn">repeat</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/rayon/iter/repeat.rs.html#30-32">Source</a> </span></div><pre class="rust item-decl"><code>pub fn repeat&lt;T: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>&gt;(element: T) -&gt; <a class="struct" href="struct.Repeat.html" title="struct rayon::iter::Repeat">Repeat</a>&lt;T&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a parallel iterator that endlessly repeats <code>element</code> (by
cloning it). Note that this iterator has “infinite” length, so
typically you would want to use <code>zip</code> or <code>take</code> or some other
means to shorten it, or consider using
<a href="fn.repeat_n.html" title="fn rayon::iter::repeat_n">the <code>repeat_n()</code> function</a> instead.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<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::repeat;
<span class="kw">let </span>x: Vec&lt;(i32, i32)&gt; = repeat(<span class="number">22</span>).zip(<span class="number">0</span>..<span class="number">3</span>).collect();
<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[(<span class="number">22</span>, <span class="number">0</span>), (<span class="number">22</span>, <span class="number">1</span>), (<span class="number">22</span>, <span class="number">2</span>)]);</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,7 @@
<!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="Creates a parallel iterator that produces `n` repeats of `element` (by cloning it)."><title>repeat_n in rayon::iter - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">repeat_n</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">repeat_<wbr>n</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">rayon</a>::<wbr><a href="index.html">iter</a></div><h1>Function <span class="fn">repeat_<wbr>n</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/rayon/iter/repeat.rs.html#126-132">Source</a> </span></div><pre class="rust item-decl"><code>pub fn repeat_n&lt;T: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>&gt;(element: T, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.RepeatN.html" title="struct rayon::iter::RepeatN">RepeatN</a>&lt;T&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a parallel iterator that produces <code>n</code> repeats of <code>element</code>
(by cloning it).</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<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::repeat_n;
<span class="kw">let </span>x: Vec&lt;(i32, i32)&gt; = repeat_n(<span class="number">22</span>, <span class="number">3</span>).zip(<span class="number">0</span>..<span class="number">3</span>).collect();
<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[(<span class="number">22</span>, <span class="number">0</span>), (<span class="number">22</span>, <span class="number">1</span>), (<span class="number">22</span>, <span class="number">2</span>)]);</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,4 @@
<!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="Creates a parallel iterator that produces `n` repeats of `element` (by cloning it)."><title>repeatn in rayon::iter - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">repeatn</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">rayon</a>::<wbr><a href="index.html">iter</a></div><h1>Function <span class="fn">repeatn</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/rayon/iter/repeat.rs.html#139-141">Source</a> </span></div><pre class="rust item-decl"><code>pub fn repeatn&lt;T: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>&gt;(element: T, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.RepeatN.html" title="struct rayon::iter::RepeatN">RepeatN</a>&lt;T&gt;</code></pre><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>repeat_n</code></span></div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a parallel iterator that produces <code>n</code> repeats of <code>element</code>
(by cloning it).</p>
<p>Deprecated in favor of <a href="fn.repeat_n.html" title="fn rayon::iter::repeat_n"><code>repeat_n</code></a> for consistency with the standard library.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,84 @@
<!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="The `split` function takes arbitrary data and a closure that knows how to split it, and turns this into a `ParallelIterator`."><title>split in rayon::iter - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">split</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">split</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">rayon</a>::<wbr><a href="index.html">iter</a></div><h1>Function <span class="fn">split</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/rayon/iter/splitter.rs.html#106-112">Source</a> </span></div><pre class="rust item-decl"><code>pub fn split&lt;D, S&gt;(data: D, splitter: S) -&gt; <a class="struct" href="struct.Split.html" title="struct rayon::iter::Split">Split</a>&lt;D, S&gt;<div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
S: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(D) -&gt; (D, <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;D&gt;) + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The <code>split</code> function takes arbitrary data and a closure that knows how to
split it, and turns this into a <code>ParallelIterator</code>.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<p>As a simple example, Rayon can recursively split ranges of indices</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::iter;
<span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>;
<span class="kw">use </span>std::ops::Range;
<span class="comment">// We define a range of indices as follows
</span><span class="kw">type </span>Range1D = Range&lt;usize&gt;;
<span class="comment">// Splitting it in two can be done like this
</span><span class="kw">fn </span>split_range1(r: Range1D) -&gt; (Range1D, <span class="prelude-ty">Option</span>&lt;Range1D&gt;) {
<span class="comment">// We are mathematically unable to split the range if there is only
// one point inside of it, but we could stop splitting before that.
</span><span class="kw">if </span>r.end - r.start &lt;= <span class="number">1 </span>{ <span class="kw">return </span>(r, <span class="prelude-val">None</span>); }
<span class="comment">// Here, our range is considered large enough to be splittable
</span><span class="kw">let </span>midpoint = r.start + (r.end - r.start) / <span class="number">2</span>;
(r.start..midpoint, <span class="prelude-val">Some</span>(midpoint..r.end))
}
<span class="comment">// By using iter::split, Rayon will split the range until it has enough work
// to feed the CPU cores, then give us the resulting sub-ranges
</span>iter::split(<span class="number">0</span>..<span class="number">4096</span>, split_range1).for_each(|sub_range| {
<span class="comment">// As our initial range had a power-of-two size, the final sub-ranges
// should have power-of-two sizes too
</span><span class="macro">assert!</span>((sub_range.end - sub_range.start).is_power_of_two());
});</code></pre></div>
<p>This recursive splitting can be extended to two or three dimensions,
to reproduce a classic “block-wise” parallelization scheme of graphics and
numerical simulations:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// A two-dimensional range of indices can be built out of two 1D ones
</span><span class="kw">struct </span>Range2D {
<span class="comment">// Range of horizontal indices
</span><span class="kw">pub </span>rx: Range1D,
<span class="comment">// Range of vertical indices
</span><span class="kw">pub </span>ry: Range1D,
}
<span class="comment">// We want to recursively split them by the largest dimension until we have
// enough sub-ranges to feed our mighty multi-core CPU. This function
// carries out one such split.
</span><span class="kw">fn </span>split_range2(r2: Range2D) -&gt; (Range2D, <span class="prelude-ty">Option</span>&lt;Range2D&gt;) {
<span class="comment">// Decide on which axis (horizontal/vertical) the range should be split
</span><span class="kw">let </span>width = r2.rx.end - r2.rx.start;
<span class="kw">let </span>height = r2.ry.end - r2.ry.start;
<span class="kw">if </span>width &gt;= height {
<span class="comment">// This is a wide range, split it on the horizontal axis
</span><span class="kw">let </span>(split_rx, ry) = (split_range1(r2.rx), r2.ry);
<span class="kw">let </span>out1 = Range2D {
rx: split_rx.<span class="number">0</span>,
ry: ry.clone(),
};
<span class="kw">let </span>out2 = split_rx.<span class="number">1</span>.map(|rx| Range2D { rx, ry });
(out1, out2)
} <span class="kw">else </span>{
<span class="comment">// This is a tall range, split it on the vertical axis
</span><span class="kw">let </span>(rx, split_ry) = (r2.rx, split_range1(r2.ry));
<span class="kw">let </span>out1 = Range2D {
rx: rx.clone(),
ry: split_ry.<span class="number">0</span>,
};
<span class="kw">let </span>out2 = split_ry.<span class="number">1</span>.map(|ry| Range2D { rx, ry, });
(out1, out2)
}
}
<span class="comment">// Again, rayon can handle the recursive splitting for us
</span><span class="kw">let </span>range = Range2D { rx: <span class="number">0</span>..<span class="number">800</span>, ry: <span class="number">0</span>..<span class="number">600 </span>};
iter::split(range, split_range2).for_each(|sub_range| {
<span class="comment">// If the sub-ranges were indeed split by the largest dimension, then
// if no dimension was twice larger than the other initially, this
// property will remain true in the final sub-ranges.
</span><span class="kw">let </span>width = sub_range.rx.end - sub_range.rx.start;
<span class="kw">let </span>height = sub_range.ry.end - sub_range.ry.start;
<span class="macro">assert!</span>((width / <span class="number">2 </span>&lt;= height) &amp;&amp; (height / <span class="number">2 </span>&lt;= width));
});</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,29 @@
<!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="Create a tree like parallel iterator from an initial root node. The `children_of` function should take a node and iterate on all of its child nodes. The best parallelization is obtained when the tree is balanced but we should also be able to handle harder cases."><title>walk_tree in rayon::iter - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">walk_tree</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">walk_<wbr>tree</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#ordering" title="Ordering">Ordering</a></li><li><a href="#example" title="Example">Example</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">rayon</a>::<wbr><a href="index.html">iter</a></div><h1>Function <span class="fn">walk_<wbr>tree</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/rayon/iter/walk_tree.rs.html#497-508">Source</a> </span></div><pre class="rust item-decl"><code>pub fn walk_tree&lt;S, B, I&gt;(root: S, children_of: B) -&gt; <a class="struct" href="struct.WalkTree.html" title="struct rayon::iter::WalkTree">WalkTree</a>&lt;S, B&gt;<div class="where">where
S: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
B: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;S</a>) -&gt; I + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = S, IntoIter: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a>&gt;,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create a tree like parallel iterator from an initial root node.
The <code>children_of</code> function should take a node and iterate on all of its child nodes.
The best parallelization is obtained when the tree is balanced
but we should also be able to handle harder cases.</p>
<h2 id="ordering"><a class="doc-anchor" href="#ordering">§</a>Ordering</h2>
<p>This function does not guarantee any ordering but will
use whatever algorithm is thought to achieve the fastest traversal.
See also <a href="fn.walk_tree_prefix.html" title="fn rayon::iter::walk_tree_prefix"><code>walk_tree_prefix</code></a> which guarantees a
prefix order and <a href="fn.walk_tree_postfix.html" title="fn rayon::iter::walk_tree_postfix"><code>walk_tree_postfix</code></a> which guarantees a postfix order.</p>
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2><div class="example-wrap"><pre class="language-text"><code> 4
/ \
/ \
2 3
/ \
1 2</code></pre></div>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::iter::walk_tree;
<span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>par_iter = walk_tree(<span class="number">4</span>, |<span class="kw-2">&amp;</span>e| {
<span class="kw">if </span>e &lt;= <span class="number">2 </span>{
Vec::new()
} <span class="kw">else </span>{
<span class="macro">vec!</span>[e / <span class="number">2</span>, e / <span class="number">2 </span>+ <span class="number">1</span>]
}
});
<span class="macro">assert_eq!</span>(par_iter.sum::&lt;u32&gt;(), <span class="number">12</span>);</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,88 @@
<!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="Create a tree like postfix parallel iterator from an initial root node. The `children_of` function should take a node and iterate on all of its child nodes. The best parallelization is obtained when the tree is balanced but we should also be able to handle harder cases."><title>walk_tree_postfix in rayon::iter - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">walk_tree_postfix</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">walk_<wbr>tree_<wbr>postfix</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#ordering" title="Ordering">Ordering</a></li><li><a href="#example" title="Example">Example</a></li><li><a href="#example-1" title="Example">Example</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">rayon</a>::<wbr><a href="index.html">iter</a></div><h1>Function <span class="fn">walk_<wbr>tree_<wbr>postfix</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/rayon/iter/walk_tree.rs.html#444-454">Source</a> </span></div><pre class="rust item-decl"><code>pub fn walk_tree_postfix&lt;S, B, I&gt;(
root: S,
children_of: B,
) -&gt; <a class="struct" href="struct.WalkTreePostfix.html" title="struct rayon::iter::WalkTreePostfix">WalkTreePostfix</a>&lt;S, B&gt;<div class="where">where
S: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
B: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;S</a>) -&gt; I + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = S&gt;,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create a tree like postfix parallel iterator from an initial root node.
The <code>children_of</code> function should take a node and iterate on all of its child nodes.
The best parallelization is obtained when the tree is balanced
but we should also be able to handle harder cases.</p>
<h2 id="ordering"><a class="doc-anchor" href="#ordering">§</a>Ordering</h2>
<p>This function guarantees a postfix ordering. See also <a href="fn.walk_tree_prefix.html" title="fn rayon::iter::walk_tree_prefix"><code>walk_tree_prefix</code></a> which guarantees a
prefix order. If you dont care about ordering, you should use <a href="fn.walk_tree.html" title="fn rayon::iter::walk_tree"><code>walk_tree</code></a>, which will use
whatever is believed to be fastest.</p>
<p>Between siblings, children are reduced in order that is first children are reduced first.</p>
<p>For example a perfect binary tree of 7 nodes will reduced in the following order:</p>
<div class="example-wrap"><pre class="language-text"><code> a
/ \
/ \
b c
/ \ / \
d e f g
reduced as d,e,b,f,g,c,a
</code></pre></div><h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2><div class="example-wrap"><pre class="language-text"><code> 4
/ \
/ \
2 3
/ \
1 2</code></pre></div>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::iter::walk_tree_postfix;
<span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>par_iter = walk_tree_postfix(<span class="number">4</span>, |<span class="kw-2">&amp;</span>e| {
<span class="kw">if </span>e &lt;= <span class="number">2 </span>{
Vec::new()
} <span class="kw">else </span>{
<span class="macro">vec!</span>[e / <span class="number">2</span>, e / <span class="number">2 </span>+ <span class="number">1</span>]
}
});
<span class="macro">assert_eq!</span>(par_iter.sum::&lt;u32&gt;(), <span class="number">12</span>);</code></pre></div><h2 id="example-1"><a class="doc-anchor" href="#example-1">§</a>Example</h2>
<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::walk_tree_postfix;
<span class="kw">struct </span>Node {
content: u32,
left: <span class="prelude-ty">Option</span>&lt;Box&lt;Node&gt;&gt;,
right: <span class="prelude-ty">Option</span>&lt;Box&lt;Node&gt;&gt;,
}
<span class="comment">// Here we loop on the following tree:
//
// 10
// / \
// / \
// 3 14
// \
// \
// 18
</span><span class="kw">let </span>root = Node {
content: <span class="number">10</span>,
left: <span class="prelude-val">Some</span>(Box::new(Node {
content: <span class="number">3</span>,
left: <span class="prelude-val">None</span>,
right: <span class="prelude-val">None</span>,
})),
right: <span class="prelude-val">Some</span>(Box::new(Node {
content: <span class="number">14</span>,
left: <span class="prelude-val">None</span>,
right: <span class="prelude-val">Some</span>(Box::new(Node {
content: <span class="number">18</span>,
left: <span class="prelude-val">None</span>,
right: <span class="prelude-val">None</span>,
})),
})),
};
<span class="kw">let </span><span class="kw-2">mut </span>v: Vec&lt;u32&gt; = walk_tree_postfix(<span class="kw-2">&amp;</span>root, |r| {
r.left
.as_ref()
.into_iter()
.chain(r.right.as_ref())
.map(|n| <span class="kw-2">&amp;**</span>n)
})
.map(|node| node.content)
.collect();
<span class="macro">assert_eq!</span>(v, <span class="macro">vec!</span>[<span class="number">3</span>, <span class="number">18</span>, <span class="number">14</span>, <span class="number">10</span>]);</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,88 @@
<!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="Create a tree-like prefix parallel iterator from an initial root node. The `children_of` function should take a node and return an iterator over its child nodes. The best parallelization is obtained when the tree is balanced but we should also be able to handle harder cases."><title>walk_tree_prefix in rayon::iter - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">walk_tree_prefix</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">walk_<wbr>tree_<wbr>prefix</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#ordering" title="Ordering">Ordering</a></li><li><a href="#example" title="Example">Example</a></li><li><a href="#example-1" title="Example">Example</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">rayon</a>::<wbr><a href="index.html">iter</a></div><h1>Function <span class="fn">walk_<wbr>tree_<wbr>prefix</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/rayon/iter/walk_tree.rs.html#204-214">Source</a> </span></div><pre class="rust item-decl"><code>pub fn walk_tree_prefix&lt;S, B, I&gt;(
root: S,
children_of: B,
) -&gt; <a class="struct" href="struct.WalkTreePrefix.html" title="struct rayon::iter::WalkTreePrefix">WalkTreePrefix</a>&lt;S, B&gt;<div class="where">where
S: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
B: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;S</a>) -&gt; I + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = S, IntoIter: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a>&gt;,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create a tree-like prefix parallel iterator from an initial root node.
The <code>children_of</code> function should take a node and return an iterator over its child nodes.
The best parallelization is obtained when the tree is balanced
but we should also be able to handle harder cases.</p>
<h2 id="ordering"><a class="doc-anchor" href="#ordering">§</a>Ordering</h2>
<p>This function guarantees a prefix ordering. See also <a href="fn.walk_tree_postfix.html" title="fn rayon::iter::walk_tree_postfix"><code>walk_tree_postfix</code></a>,
which guarantees a postfix order.
If you dont care about ordering, you should use <a href="fn.walk_tree.html" title="fn rayon::iter::walk_tree"><code>walk_tree</code></a>,
which will use whatever is believed to be fastest.
For example a perfect binary tree of 7 nodes will reduced in the following order:</p>
<div class="example-wrap"><pre class="language-text"><code> a
/ \
/ \
b c
/ \ / \
d e f g
reduced as a,b,d,e,c,f,g
</code></pre></div><h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2><div class="example-wrap"><pre class="language-text"><code> 4
/ \
/ \
2 3
/ \
1 2</code></pre></div>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rayon::iter::walk_tree_prefix;
<span class="kw">use </span>rayon::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>par_iter = walk_tree_prefix(<span class="number">4</span>, |<span class="kw-2">&amp;</span>e| {
<span class="kw">if </span>e &lt;= <span class="number">2 </span>{
Vec::new()
} <span class="kw">else </span>{
<span class="macro">vec!</span>[e / <span class="number">2</span>, e / <span class="number">2 </span>+ <span class="number">1</span>]
}
});
<span class="macro">assert_eq!</span>(par_iter.sum::&lt;u32&gt;(), <span class="number">12</span>);</code></pre></div><h2 id="example-1"><a class="doc-anchor" href="#example-1">§</a>Example</h2>
<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::walk_tree_prefix;
<span class="kw">struct </span>Node {
content: u32,
left: <span class="prelude-ty">Option</span>&lt;Box&lt;Node&gt;&gt;,
right: <span class="prelude-ty">Option</span>&lt;Box&lt;Node&gt;&gt;,
}
<span class="comment">// Here we loop on the following tree:
//
// 10
// / \
// / \
// 3 14
// \
// \
// 18
</span><span class="kw">let </span>root = Node {
content: <span class="number">10</span>,
left: <span class="prelude-val">Some</span>(Box::new(Node {
content: <span class="number">3</span>,
left: <span class="prelude-val">None</span>,
right: <span class="prelude-val">None</span>,
})),
right: <span class="prelude-val">Some</span>(Box::new(Node {
content: <span class="number">14</span>,
left: <span class="prelude-val">None</span>,
right: <span class="prelude-val">Some</span>(Box::new(Node {
content: <span class="number">18</span>,
left: <span class="prelude-val">None</span>,
right: <span class="prelude-val">None</span>,
})),
})),
};
<span class="kw">let </span><span class="kw-2">mut </span>v: Vec&lt;u32&gt; = walk_tree_prefix(<span class="kw-2">&amp;</span>root, |r| {
r.left
.as_ref()
.into_iter()
.chain(r.right.as_ref())
.map(|n| <span class="kw-2">&amp;**</span>n)
})
.map(|node| node.content)
.collect();
<span class="macro">assert_eq!</span>(v, <span class="macro">vec!</span>[<span class="number">10</span>, <span class="number">3</span>, <span class="number">14</span>, <span class="number">18</span>]);</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Fold.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Fold.html">../../../rayon/iter/struct.Fold.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Fold.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.FoldWith.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.FoldWith.html">../../../rayon/iter/struct.FoldWith.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.FoldWith.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.FoldChunks.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.FoldChunks.html">../../../rayon/iter/struct.FoldChunks.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.FoldChunks.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.FoldChunksWith.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.FoldChunksWith.html">../../../rayon/iter/struct.FoldChunksWith.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.FoldChunksWith.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,133 @@
<!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="Traits for writing parallel programs using an iterator-style interface"><title>rayon::iter - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module iter</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module iter</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate rayon</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">rayon</a></div><h1>Module <span>iter</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/rayon/iter/mod.rs.html#1-3627">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Traits for writing parallel programs using an iterator-style interface</p>
<p>You will rarely need to interact with this module directly unless you have
need to name one of the iterator types.</p>
<p>Parallel iterators make it easy to write iterator-like chains that
execute in parallel: typically all you have to do is convert the
first <code>.iter()</code> (or <code>iter_mut()</code>, <code>into_iter()</code>, etc) method into
<code>par_iter()</code> (or <code>par_iter_mut()</code>, <code>into_par_iter()</code>, etc). For
example, to compute the sum of the squares of a sequence of
integers, one might write:</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">fn </span>sum_of_squares(input: <span class="kw-2">&amp;</span>[i32]) -&gt; i32 {
input.par_iter()
.map(|i| i * i)
.sum()
}</code></pre></div>
<p>Or, to increment all the integers in a slice, you could write:</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">fn </span>increment_all(input: <span class="kw-2">&amp;mut </span>[i32]) {
input.par_iter_mut()
.for_each(|p| <span class="kw-2">*</span>p += <span class="number">1</span>);
}</code></pre></div>
<p>To use parallel iterators, first import the traits by adding
something like <code>use rayon::prelude::*</code> to your module. You can
then call <code>par_iter</code>, <code>par_iter_mut</code>, or <code>into_par_iter</code> to get a
parallel iterator. Like a <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">regular iterator</a>, parallel
iterators work by first constructing a computation and then
executing it.</p>
<p>In addition to <code>par_iter()</code> and friends, some types offer other
ways to create (or consume) parallel iterators:</p>
<ul>
<li>Slices (<code>&amp;[T]</code>, <code>&amp;mut [T]</code>) offer methods like <code>par_split</code> and
<code>par_windows</code>, as well as various parallel sorting
operations. See <a href="../slice/trait.ParallelSlice.html" title="trait rayon::slice::ParallelSlice">the <code>ParallelSlice</code> trait</a> for the full list.</li>
<li>Strings (<code>&amp;str</code>) offer methods like <code>par_split</code> and <code>par_lines</code>.
See <a href="../str/trait.ParallelString.html" title="trait rayon::str::ParallelString">the <code>ParallelString</code> trait</a> for the full list.</li>
<li>Various collections offer <a href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend"><code>par_extend</code></a>, which grows a
collection given a parallel iterator. (If you dont have a
collection to extend, you can use <a href="trait.ParallelIterator.html#method.collect" title="method rayon::iter::ParallelIterator::collect"><code>collect()</code></a> to create a new
one from scratch.)</li>
</ul>
<p>To see the full range of methods available on parallel iterators,
check out the <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a> and <a href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator"><code>IndexedParallelIterator</code></a>
traits.</p>
<p>If youd like to build a custom parallel iterator, or to write your own
combinator, then check out the <a href="fn.split.html" title="fn rayon::iter::split">split</a> function and the <a href="plumbing/index.html" title="mod rayon::iter::plumbing">plumbing</a> module.</p>
<p>Note: Several of the <code>ParallelIterator</code> methods rely on a <code>Try</code> trait which
has been deliberately obscured from the public API. This trait is intended
to mirror the unstable <code>std::ops::Try</code> with implementations for <code>Option</code> and
<code>Result</code>, where <code>Some</code>/<code>Ok</code> values will let those iterators continue, but
<code>None</code>/<code>Err</code> values will exit early.</p>
<p>A note about object safety: It is currently <em>not</em> possible to wrap
a <code>ParallelIterator</code> (or any trait that depends on it) using a
<code>Box&lt;dyn ParallelIterator&gt;</code> or other kind of dynamic allocation,
because <code>ParallelIterator</code> is <strong>not object-safe</strong>.
(This keeps the implementation simpler and allows extra optimizations.)</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="plumbing/index.html" title="mod rayon::iter::plumbing">plumbing</a></dt><dd>Traits and functions used to implement parallel iteration. These are
low-level details users of parallel iterators should not need to
interact with them directly. See <a href="https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md">the <code>plumbing</code> README</a> for a general overview.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Chain.html" title="struct rayon::iter::Chain">Chain</a></dt><dd><code>Chain</code> is an iterator that joins <code>b</code> after <code>a</code> in one continuous iterator.
This struct is created by the <a href="trait.ParallelIterator.html#method.chain" title="method rayon::iter::ParallelIterator::chain"><code>chain()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.Chunks.html" title="struct rayon::iter::Chunks">Chunks</a></dt><dd><code>Chunks</code> is an iterator that groups elements of an underlying iterator.</dd><dt><a class="struct" href="struct.Cloned.html" title="struct rayon::iter::Cloned">Cloned</a></dt><dd><code>Cloned</code> is an iterator that clones the elements of an underlying iterator.</dd><dt><a class="struct" href="struct.Copied.html" title="struct rayon::iter::Copied">Copied</a></dt><dd><code>Copied</code> is an iterator that copies the elements of an underlying iterator.</dd><dt><a class="struct" href="struct.Empty.html" title="struct rayon::iter::Empty">Empty</a></dt><dd>Iterator adaptor for <a href="fn.empty.html" title="fn rayon::iter::empty">the <code>empty()</code> function</a>.</dd><dt><a class="struct" href="struct.Enumerate.html" title="struct rayon::iter::Enumerate">Enumerate</a></dt><dd><code>Enumerate</code> is an iterator that returns the current count along with the element.
This struct is created by the <a href="trait.IndexedParallelIterator.html#method.enumerate" title="method rayon::iter::IndexedParallelIterator::enumerate"><code>enumerate()</code></a> method on <a href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator"><code>IndexedParallelIterator</code></a></dd><dt><a class="struct" href="struct.ExponentialBlocks.html" title="struct rayon::iter::ExponentialBlocks">Exponential<wbr>Blocks</a></dt><dd><code>ExponentialBlocks</code> is a parallel iterator that consumes itself as a sequence
of parallel blocks of increasing sizes (exponentially).</dd><dt><a class="struct" href="struct.Filter.html" title="struct rayon::iter::Filter">Filter</a></dt><dd><code>Filter</code> takes a predicate <code>filter_op</code> and filters out elements that match.
This struct is created by the <a href="trait.ParallelIterator.html#method.filter" title="method rayon::iter::ParallelIterator::filter"><code>filter()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.FilterMap.html" title="struct rayon::iter::FilterMap">Filter<wbr>Map</a></dt><dd><code>FilterMap</code> creates an iterator that uses <code>filter_op</code> to both filter and map elements.
This struct is created by the <a href="trait.ParallelIterator.html#method.filter_map" title="method rayon::iter::ParallelIterator::filter_map"><code>filter_map()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a>.</dd><dt><a class="struct" href="struct.FlatMap.html" title="struct rayon::iter::FlatMap">FlatMap</a></dt><dd><code>FlatMap</code> maps each element to a parallel iterator, then flattens these iterators together.
This struct is created by the <a href="trait.ParallelIterator.html#method.flat_map" title="method rayon::iter::ParallelIterator::flat_map"><code>flat_map()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.FlatMapIter.html" title="struct rayon::iter::FlatMapIter">Flat<wbr>MapIter</a></dt><dd><code>FlatMapIter</code> maps each element to a serial iterator, then flattens these iterators together.
This struct is created by the <a href="trait.ParallelIterator.html#method.flat_map_iter" title="method rayon::iter::ParallelIterator::flat_map_iter"><code>flat_map_iter()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.Flatten.html" title="struct rayon::iter::Flatten">Flatten</a></dt><dd><code>Flatten</code> turns each element to a parallel iterator, then flattens these iterators
together. This struct is created by the <a href="trait.ParallelIterator.html#method.flatten" title="method rayon::iter::ParallelIterator::flatten"><code>flatten()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a>.</dd><dt><a class="struct" href="struct.FlattenIter.html" title="struct rayon::iter::FlattenIter">Flatten<wbr>Iter</a></dt><dd><code>FlattenIter</code> turns each element to a serial iterator, then flattens these iterators
together. This struct is created by the <a href="trait.ParallelIterator.html#method.flatten_iter" title="method rayon::iter::ParallelIterator::flatten_iter"><code>flatten_iter()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a>.</dd><dt><a class="struct" href="struct.Fold.html" title="struct rayon::iter::Fold">Fold</a></dt><dd><code>Fold</code> is an iterator that applies a function over an iterator producing a single value.
This struct is created by the <a href="trait.ParallelIterator.html#method.fold" title="method rayon::iter::ParallelIterator::fold"><code>fold()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.FoldChunks.html" title="struct rayon::iter::FoldChunks">Fold<wbr>Chunks</a></dt><dd><code>FoldChunks</code> is an iterator that groups elements of an underlying iterator and applies a
function over them, producing a single value for each group.</dd><dt><a class="struct" href="struct.FoldChunksWith.html" title="struct rayon::iter::FoldChunksWith">Fold<wbr>Chunks<wbr>With</a></dt><dd><code>FoldChunksWith</code> is an iterator that groups elements of an underlying iterator and applies a
function over them, producing a single value for each group.</dd><dt><a class="struct" href="struct.FoldWith.html" title="struct rayon::iter::FoldWith">Fold<wbr>With</a></dt><dd><code>FoldWith</code> is an iterator that applies a function over an iterator producing a single value.
This struct is created by the <a href="trait.ParallelIterator.html#method.fold_with" title="method rayon::iter::ParallelIterator::fold_with"><code>fold_with()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.Inspect.html" title="struct rayon::iter::Inspect">Inspect</a></dt><dd><code>Inspect</code> is an iterator that calls a function with a reference to each
element before yielding it.</dd><dt><a class="struct" href="struct.Interleave.html" title="struct rayon::iter::Interleave">Interleave</a></dt><dd><code>Interleave</code> is an iterator that interleaves elements of iterators
<code>i</code> and <code>j</code> in one continuous iterator. This struct is created by
the <a href="trait.IndexedParallelIterator.html#method.interleave" title="method rayon::iter::IndexedParallelIterator::interleave"><code>interleave()</code></a> method on <a href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator"><code>IndexedParallelIterator</code></a></dd><dt><a class="struct" href="struct.InterleaveShortest.html" title="struct rayon::iter::InterleaveShortest">Interleave<wbr>Shortest</a></dt><dd><code>InterleaveShortest</code> is an iterator that works similarly to
<code>Interleave</code>, but this version stops returning elements once one
of the iterators run out.</dd><dt><a class="struct" href="struct.Intersperse.html" title="struct rayon::iter::Intersperse">Intersperse</a></dt><dd><code>Intersperse</code> is an iterator that inserts a particular item between each
item of the adapted iterator. This struct is created by the
<a href="trait.ParallelIterator.html#method.intersperse" title="method rayon::iter::ParallelIterator::intersperse"><code>intersperse()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.IterBridge.html" title="struct rayon::iter::IterBridge">Iter<wbr>Bridge</a></dt><dd><code>IterBridge</code> is a parallel iterator that wraps a sequential iterator.</dd><dt><a class="struct" href="struct.Map.html" title="struct rayon::iter::Map">Map</a></dt><dd><code>Map</code> is an iterator that transforms the elements of an underlying iterator.</dd><dt><a class="struct" href="struct.MapInit.html" title="struct rayon::iter::MapInit">MapInit</a></dt><dd><code>MapInit</code> is an iterator that transforms the elements of an underlying iterator.</dd><dt><a class="struct" href="struct.MapWith.html" title="struct rayon::iter::MapWith">MapWith</a></dt><dd><code>MapWith</code> is an iterator that transforms the elements of an underlying iterator.</dd><dt><a class="struct" href="struct.MaxLen.html" title="struct rayon::iter::MaxLen">MaxLen</a></dt><dd><code>MaxLen</code> is an iterator that imposes a maximum length on iterator splits.
This struct is created by the <a href="trait.IndexedParallelIterator.html#method.with_max_len" title="method rayon::iter::IndexedParallelIterator::with_max_len"><code>with_max_len()</code></a> method on <a href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator"><code>IndexedParallelIterator</code></a></dd><dt><a class="struct" href="struct.MinLen.html" title="struct rayon::iter::MinLen">MinLen</a></dt><dd><code>MinLen</code> is an iterator that imposes a minimum length on iterator splits.
This struct is created by the <a href="trait.IndexedParallelIterator.html#method.with_min_len" title="method rayon::iter::IndexedParallelIterator::with_min_len"><code>with_min_len()</code></a> method on <a href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator"><code>IndexedParallelIterator</code></a></dd><dt><a class="struct" href="struct.MultiZip.html" title="struct rayon::iter::MultiZip">Multi<wbr>Zip</a></dt><dd><code>MultiZip</code> is an iterator that zips up a tuple of parallel iterators to
produce tuples of their items.</dd><dt><a class="struct" href="struct.Once.html" title="struct rayon::iter::Once">Once</a></dt><dd>Iterator adaptor for <a href="fn.once.html" title="fn rayon::iter::once">the <code>once()</code> function</a>.</dd><dt><a class="struct" href="struct.PanicFuse.html" title="struct rayon::iter::PanicFuse">Panic<wbr>Fuse</a></dt><dd><code>PanicFuse</code> is an adaptor that wraps an iterator with a fuse in case
of panics, to halt all threads as soon as possible.</dd><dt><a class="struct" href="struct.Positions.html" title="struct rayon::iter::Positions">Positions</a></dt><dd><code>Positions</code> takes a predicate <code>predicate</code> and filters out elements that match,
yielding their indices.</dd><dt><a class="struct" href="struct.Repeat.html" title="struct rayon::iter::Repeat">Repeat</a></dt><dd>Iterator adaptor for <a href="fn.repeat.html" title="fn rayon::iter::repeat">the <code>repeat()</code> function</a>.</dd><dt><a class="struct" href="struct.RepeatN.html" title="struct rayon::iter::RepeatN">RepeatN</a></dt><dd>Iterator adaptor for <a href="fn.repeat_n.html" title="fn rayon::iter::repeat_n">the <code>repeat_n()</code> function</a>.</dd><dt><a class="struct" href="struct.Rev.html" title="struct rayon::iter::Rev">Rev</a></dt><dd><code>Rev</code> is an iterator that produces elements in reverse order. This struct
is created by the <a href="trait.IndexedParallelIterator.html#method.rev" title="method rayon::iter::IndexedParallelIterator::rev"><code>rev()</code></a> method on <a href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator"><code>IndexedParallelIterator</code></a></dd><dt><a class="struct" href="struct.Skip.html" title="struct rayon::iter::Skip">Skip</a></dt><dd><code>Skip</code> is an iterator that skips over the first <code>n</code> elements.
This struct is created by the <a href="trait.IndexedParallelIterator.html#method.skip" title="method rayon::iter::IndexedParallelIterator::skip"><code>skip()</code></a> method on <a href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator"><code>IndexedParallelIterator</code></a></dd><dt><a class="struct" href="struct.SkipAny.html" title="struct rayon::iter::SkipAny">SkipAny</a></dt><dd><code>SkipAny</code> is an iterator that skips over <code>n</code> elements from anywhere in <code>I</code>.
This struct is created by the <a href="trait.ParallelIterator.html#method.skip_any" title="method rayon::iter::ParallelIterator::skip_any"><code>skip_any()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.SkipAnyWhile.html" title="struct rayon::iter::SkipAnyWhile">Skip<wbr>AnyWhile</a></dt><dd><code>SkipAnyWhile</code> is an iterator that skips over elements from anywhere in <code>I</code>
until the callback returns <code>false</code>.
This struct is created by the <a href="trait.ParallelIterator.html#method.skip_any_while" title="method rayon::iter::ParallelIterator::skip_any_while"><code>skip_any_while()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.Split.html" title="struct rayon::iter::Split">Split</a></dt><dd><code>Split</code> is a parallel iterator using arbitrary data and a splitting function.
This struct is created by the <a href="fn.split.html" title="fn rayon::iter::split"><code>split()</code></a> function.</dd><dt><a class="struct" href="struct.StepBy.html" title="struct rayon::iter::StepBy">StepBy</a></dt><dd><code>StepBy</code> is an iterator that skips <code>n</code> elements between each yield, where <code>n</code> is the given step.
This struct is created by the <a href="trait.IndexedParallelIterator.html#method.step_by" title="method rayon::iter::IndexedParallelIterator::step_by"><code>step_by()</code></a> method on <a href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator"><code>IndexedParallelIterator</code></a></dd><dt><a class="struct" href="struct.Take.html" title="struct rayon::iter::Take">Take</a></dt><dd><code>Take</code> is an iterator that iterates over the first <code>n</code> elements.
This struct is created by the <a href="trait.IndexedParallelIterator.html#method.take" title="method rayon::iter::IndexedParallelIterator::take"><code>take()</code></a> method on <a href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator"><code>IndexedParallelIterator</code></a></dd><dt><a class="struct" href="struct.TakeAny.html" title="struct rayon::iter::TakeAny">TakeAny</a></dt><dd><code>TakeAny</code> is an iterator that iterates over <code>n</code> elements from anywhere in <code>I</code>.
This struct is created by the <a href="trait.ParallelIterator.html#method.take_any" title="method rayon::iter::ParallelIterator::take_any"><code>take_any()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.TakeAnyWhile.html" title="struct rayon::iter::TakeAnyWhile">Take<wbr>AnyWhile</a></dt><dd><code>TakeAnyWhile</code> is an iterator that iterates over elements from anywhere in <code>I</code>
until the callback returns <code>false</code>.
This struct is created by the <a href="trait.ParallelIterator.html#method.take_any_while" title="method rayon::iter::ParallelIterator::take_any_while"><code>take_any_while()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.TryFold.html" title="struct rayon::iter::TryFold">TryFold</a></dt><dd><code>TryFold</code> is an iterator that applies a function over an iterator producing a single value.
This struct is created by the <a href="trait.ParallelIterator.html#method.try_fold" title="method rayon::iter::ParallelIterator::try_fold"><code>try_fold()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.TryFoldWith.html" title="struct rayon::iter::TryFoldWith">TryFold<wbr>With</a></dt><dd><code>TryFoldWith</code> is an iterator that applies a function over an iterator producing a single value.
This struct is created by the <a href="trait.ParallelIterator.html#method.try_fold_with" title="method rayon::iter::ParallelIterator::try_fold_with"><code>try_fold_with()</code></a> method on <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a></dd><dt><a class="struct" href="struct.UniformBlocks.html" title="struct rayon::iter::UniformBlocks">Uniform<wbr>Blocks</a></dt><dd><code>UniformBlocks</code> is a parallel iterator that consumes itself as a sequence
of parallel blocks of constant sizes.</dd><dt><a class="struct" href="struct.Update.html" title="struct rayon::iter::Update">Update</a></dt><dd><code>Update</code> is an iterator that mutates the elements of an
underlying iterator before they are yielded.</dd><dt><a class="struct" href="struct.WalkTree.html" title="struct rayon::iter::WalkTree">Walk<wbr>Tree</a></dt><dd>ParallelIterator for arbitrary tree-shaped patterns.
Returned by the <a href="fn.walk_tree.html" title="fn rayon::iter::walk_tree"><code>walk_tree()</code></a> function.</dd><dt><a class="struct" href="struct.WalkTreePostfix.html" title="struct rayon::iter::WalkTreePostfix">Walk<wbr>Tree<wbr>Postfix</a></dt><dd>ParallelIterator for arbitrary tree-shaped patterns.
Returned by the <a href="fn.walk_tree_postfix.html" title="fn rayon::iter::walk_tree_postfix"><code>walk_tree_postfix()</code></a> function.</dd><dt><a class="struct" href="struct.WalkTreePrefix.html" title="struct rayon::iter::WalkTreePrefix">Walk<wbr>Tree<wbr>Prefix</a></dt><dd>ParallelIterator for arbitrary tree-shaped patterns.
Returned by the <a href="fn.walk_tree_prefix.html" title="fn rayon::iter::walk_tree_prefix"><code>walk_tree_prefix()</code></a> function.</dd><dt><a class="struct" href="struct.WhileSome.html" title="struct rayon::iter::WhileSome">While<wbr>Some</a></dt><dd><code>WhileSome</code> is an iterator that yields the <code>Some</code> elements of an iterator,
halting as soon as any <code>None</code> is produced.</dd><dt><a class="struct" href="struct.Zip.html" title="struct rayon::iter::Zip">Zip</a></dt><dd><code>Zip</code> is an iterator that zips up <code>a</code> and <code>b</code> into a single iterator
of pairs. This struct is created by the <a href="trait.IndexedParallelIterator.html#method.zip" title="method rayon::iter::IndexedParallelIterator::zip"><code>zip()</code></a> method on
<a href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator"><code>IndexedParallelIterator</code></a></dd><dt><a class="struct" href="struct.ZipEq.html" title="struct rayon::iter::ZipEq">ZipEq</a></dt><dd>An <a href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator"><code>IndexedParallelIterator</code></a> that iterates over two parallel iterators of equal
length simultaneously.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.Either.html" title="enum rayon::iter::Either">Either</a></dt><dd>The enum <code>Either</code> with variants <code>Left</code> and <code>Right</code> is a general purpose
sum type with two cases.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.FromParallelIterator.html" title="trait rayon::iter::FromParallelIterator">From<wbr>Parallel<wbr>Iterator</a></dt><dd><code>FromParallelIterator</code> implements the creation of a collection
from a <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a>. By implementing
<code>FromParallelIterator</code> for a given type, you define how it will be
created from an iterator.</dd><dt><a class="trait" href="trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">Indexed<wbr>Parallel<wbr>Iterator</a></dt><dd>An iterator that supports “random access” to its data, meaning
that you can split it at arbitrary indices and draw data from
those points.</dd><dt><a class="trait" href="trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">Into<wbr>Parallel<wbr>Iterator</a></dt><dd><code>IntoParallelIterator</code> implements the conversion to a <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a>.</dd><dt><a class="trait" href="trait.IntoParallelRefIterator.html" title="trait rayon::iter::IntoParallelRefIterator">Into<wbr>Parallel<wbr>RefIterator</a></dt><dd><code>IntoParallelRefIterator</code> implements the conversion to a
<a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a>, providing shared references to the data.</dd><dt><a class="trait" href="trait.IntoParallelRefMutIterator.html" title="trait rayon::iter::IntoParallelRefMutIterator">Into<wbr>Parallel<wbr>RefMut<wbr>Iterator</a></dt><dd><code>IntoParallelRefMutIterator</code> implements the conversion to a
<a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a>, providing mutable references to the data.</dd><dt><a class="trait" href="trait.ParallelBridge.html" title="trait rayon::iter::ParallelBridge">Parallel<wbr>Bridge</a></dt><dd>Conversion trait to convert an <code>Iterator</code> to a <code>ParallelIterator</code>.</dd><dt><a class="trait" href="trait.ParallelDrainFull.html" title="trait rayon::iter::ParallelDrainFull">Parallel<wbr>Drain<wbr>Full</a></dt><dd><code>ParallelDrainFull</code> creates a parallel iterator that moves all items
from a collection while retaining the original capacity.</dd><dt><a class="trait" href="trait.ParallelDrainRange.html" title="trait rayon::iter::ParallelDrainRange">Parallel<wbr>Drain<wbr>Range</a></dt><dd><code>ParallelDrainRange</code> creates a parallel iterator that moves a range of items
from a collection while retaining the original capacity.</dd><dt><a class="trait" href="trait.ParallelExtend.html" title="trait rayon::iter::ParallelExtend">Parallel<wbr>Extend</a></dt><dd><code>ParallelExtend</code> extends an existing collection with items from a <a href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator"><code>ParallelIterator</code></a>.</dd><dt><a class="trait" href="trait.ParallelIterator.html" title="trait rayon::iter::ParallelIterator">Parallel<wbr>Iterator</a></dt><dd>Parallel version of the standard iterator trait.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.empty.html" title="fn rayon::iter::empty">empty</a></dt><dd>Creates a parallel iterator that produces nothing.</dd><dt><a class="fn" href="fn.once.html" title="fn rayon::iter::once">once</a></dt><dd>Creates a parallel iterator that produces an element exactly once.</dd><dt><a class="fn" href="fn.repeat.html" title="fn rayon::iter::repeat">repeat</a></dt><dd>Creates a parallel iterator that endlessly repeats <code>element</code> (by
cloning it). Note that this iterator has “infinite” length, so
typically you would want to use <code>zip</code> or <code>take</code> or some other
means to shorten it, or consider using
<a href="fn.repeat_n.html" title="fn rayon::iter::repeat_n">the <code>repeat_n()</code> function</a> instead.</dd><dt><a class="fn" href="fn.repeat_n.html" title="fn rayon::iter::repeat_n">repeat_<wbr>n</a></dt><dd>Creates a parallel iterator that produces <code>n</code> repeats of <code>element</code>
(by cloning it).</dd><dt><a class="fn" href="fn.repeatn.html" title="fn rayon::iter::repeatn">repeatn</a><wbr><span class="stab deprecated" title="">Deprecated</span></dt><dd>Creates a parallel iterator that produces <code>n</code> repeats of <code>element</code>
(by cloning it).</dd><dt><a class="fn" href="fn.split.html" title="fn rayon::iter::split">split</a></dt><dd>The <code>split</code> function takes arbitrary data and a closure that knows how to
split it, and turns this into a <code>ParallelIterator</code>.</dd><dt><a class="fn" href="fn.walk_tree.html" title="fn rayon::iter::walk_tree">walk_<wbr>tree</a></dt><dd>Create a tree like parallel iterator from an initial root node.
The <code>children_of</code> function should take a node and iterate on all of its child nodes.
The best parallelization is obtained when the tree is balanced
but we should also be able to handle harder cases.</dd><dt><a class="fn" href="fn.walk_tree_postfix.html" title="fn rayon::iter::walk_tree_postfix">walk_<wbr>tree_<wbr>postfix</a></dt><dd>Create a tree like postfix parallel iterator from an initial root node.
The <code>children_of</code> function should take a node and iterate on all of its child nodes.
The best parallelization is obtained when the tree is balanced
but we should also be able to handle harder cases.</dd><dt><a class="fn" href="fn.walk_tree_prefix.html" title="fn rayon::iter::walk_tree_prefix">walk_<wbr>tree_<wbr>prefix</a></dt><dd>Create a tree-like prefix parallel iterator from an initial root node.
The <code>children_of</code> function should take a node and return an iterator over its child nodes.
The best parallelization is obtained when the tree is balanced
but we should also be able to handle harder cases.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Inspect.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Inspect.html">../../../rayon/iter/struct.Inspect.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Inspect.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Interleave.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Interleave.html">../../../rayon/iter/struct.Interleave.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Interleave.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.InterleaveShortest.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.InterleaveShortest.html">../../../rayon/iter/struct.InterleaveShortest.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.InterleaveShortest.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Intersperse.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Intersperse.html">../../../rayon/iter/struct.Intersperse.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Intersperse.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.MaxLen.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.MaxLen.html">../../../rayon/iter/struct.MaxLen.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.MaxLen.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.MinLen.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.MinLen.html">../../../rayon/iter/struct.MinLen.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.MinLen.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Map.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Map.html">../../../rayon/iter/struct.Map.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Map.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.MapInit.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.MapInit.html">../../../rayon/iter/struct.MapInit.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.MapInit.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.MapWith.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.MapWith.html">../../../rayon/iter/struct.MapWith.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.MapWith.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.MultiZip.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.MultiZip.html">../../../rayon/iter/struct.MultiZip.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.MultiZip.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/fn.once.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/fn.once.html">../../../rayon/iter/fn.once.html</a>...</p>
<script>location.replace("../../../rayon/iter/fn.once.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Once.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Once.html">../../../rayon/iter/struct.Once.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Once.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.PanicFuse.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.PanicFuse.html">../../../rayon/iter/struct.PanicFuse.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.PanicFuse.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.IterBridge.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.IterBridge.html">../../../rayon/iter/struct.IterBridge.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.IterBridge.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/trait.ParallelBridge.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/trait.ParallelBridge.html">../../../rayon/iter/trait.ParallelBridge.html</a>...</p>
<script>location.replace("../../../rayon/iter/trait.ParallelBridge.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!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="This helper function is used to “connect” a parallel iterator to a consumer. It will convert the `par_iter` into a producer P and then pull items from P and feed them to `consumer`, splitting and creating parallel threads as needed."><title>bridge in rayon::iter::plumbing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">bridge</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter::<wbr>plumbing</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">rayon</a>::<wbr><a href="../index.html">iter</a>::<wbr><a href="index.html">plumbing</a></div><h1>Function <span class="fn">bridge</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/rayon/iter/plumbing/mod.rs.html#346-371">Source</a> </span></div><pre class="rust item-decl"><code>pub fn bridge&lt;I, C&gt;(par_iter: I, consumer: C) -&gt; C::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a><div class="where">where
I: <a class="trait" href="../trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,
C: <a class="trait" href="trait.Consumer.html" title="trait rayon::iter::plumbing::Consumer">Consumer</a>&lt;I::<a class="associatedtype" href="../trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>&gt;,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This helper function is used to “connect” a parallel iterator to a
consumer. It will convert the <code>par_iter</code> into a producer P and
then pull items from P and feed them to <code>consumer</code>, splitting and
creating parallel threads as needed.</p>
<p>This is useful when you are implementing your own parallel
iterators: it is often used as the definition of the
<a href="../trait.ParallelIterator.html#tymethod.drive_unindexed" title="method rayon::iter::ParallelIterator::drive_unindexed"><code>drive_unindexed</code></a> or <a href="../trait.IndexedParallelIterator.html#tymethod.drive" title="method rayon::iter::IndexedParallelIterator::drive"><code>drive</code></a> methods.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,15 @@
<!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="This helper function is used to “connect” a producer and a consumer. You may prefer to call `bridge()`, which wraps this function. This function will draw items from `producer` and feed them to `consumer`, splitting and creating parallel tasks when needed."><title>bridge_producer_consumer in rayon::iter::plumbing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">bridge_producer_consumer</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter::<wbr>plumbing</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">rayon</a>::<wbr><a href="../index.html">iter</a>::<wbr><a href="index.html">plumbing</a></div><h1>Function <span class="fn">bridge_<wbr>producer_<wbr>consumer</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/rayon/iter/plumbing/mod.rs.html#385-435">Source</a> </span></div><pre class="rust item-decl"><code>pub fn bridge_producer_consumer&lt;P, C&gt;(
len: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>,
producer: P,
consumer: C,
) -&gt; C::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a><div class="where">where
P: <a class="trait" href="trait.Producer.html" title="trait rayon::iter::plumbing::Producer">Producer</a>,
C: <a class="trait" href="trait.Consumer.html" title="trait rayon::iter::plumbing::Consumer">Consumer</a>&lt;P::<a class="associatedtype" href="trait.Producer.html#associatedtype.Item" title="type rayon::iter::plumbing::Producer::Item">Item</a>&gt;,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This helper function is used to “connect” a producer and a
consumer. You may prefer to call <a href="fn.bridge.html" title="fn rayon::iter::plumbing::bridge"><code>bridge()</code></a>, which wraps this
function. This function will draw items from <code>producer</code> and feed
them to <code>consumer</code>, splitting and creating parallel tasks when
needed.</p>
<p>This is useful when you are implementing your own parallel
iterators: it is often used as the definition of the
<a href="../trait.ParallelIterator.html#tymethod.drive_unindexed" title="method rayon::iter::ParallelIterator::drive_unindexed"><code>drive_unindexed</code></a> or <a href="../trait.IndexedParallelIterator.html#tymethod.drive" title="method rayon::iter::IndexedParallelIterator::drive"><code>drive</code></a> methods.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,4 @@
<!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="A variant of `bridge_producer_consumer()` where the producer is an unindexed producer."><title>bridge_unindexed in rayon::iter::plumbing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">bridge_unindexed</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter::<wbr>plumbing</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">rayon</a>::<wbr><a href="../index.html">iter</a>::<wbr><a href="index.html">plumbing</a></div><h1>Function <span class="fn">bridge_<wbr>unindexed</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/rayon/iter/plumbing/mod.rs.html#438-445">Source</a> </span></div><pre class="rust item-decl"><code>pub fn bridge_unindexed&lt;P, C&gt;(producer: P, consumer: C) -&gt; C::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a><div class="where">where
P: <a class="trait" href="trait.UnindexedProducer.html" title="trait rayon::iter::plumbing::UnindexedProducer">UnindexedProducer</a>,
C: <a class="trait" href="trait.UnindexedConsumer.html" title="trait rayon::iter::plumbing::UnindexedConsumer">UnindexedConsumer</a>&lt;P::<a class="associatedtype" href="trait.UnindexedProducer.html#associatedtype.Item" title="type rayon::iter::plumbing::UnindexedProducer::Item">Item</a>&gt;,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A variant of <a href="fn.bridge_producer_consumer.html" title="fn rayon::iter::plumbing::bridge_producer_consumer"><code>bridge_producer_consumer()</code></a> where the producer is an unindexed producer.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,45 @@
<!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="Traits and functions used to implement parallel iteration. These are low-level details users of parallel iterators should not need to interact with them directly. See the `plumbing` README for a general overview."><title>rayon::iter::plumbing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module plumbing</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module plumbing</a></h2><h3><a href="#traits">Module Items</a></h3><ul class="block"><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In rayon::<wbr>iter</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">rayon</a>::<wbr><a href="../index.html">iter</a></div><h1>Module <span>plumbing</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/rayon/iter/plumbing/mod.rs.html#1-476">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Traits and functions used to implement parallel iteration. These are
low-level details users of parallel iterators should not need to
interact with them directly. See <a href="https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md">the <code>plumbing</code> README</a> for a general overview.</p>
</div></details><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.Consumer.html" title="trait rayon::iter::plumbing::Consumer">Consumer</a></dt><dd>A consumer is effectively a <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.fold" title="method core::iter::traits::iterator::Iterator::fold">generalized “fold” operation</a>,
and in fact each consumer will eventually be converted into a
<a href="trait.Folder.html" title="trait rayon::iter::plumbing::Folder"><code>Folder</code></a>. What makes a consumer special is that, like a
<a href="trait.Producer.html" title="trait rayon::iter::plumbing::Producer"><code>Producer</code></a>, it can be <strong>split</strong> into multiple consumers using
the <code>split_at</code> method. When a consumer is split, it produces two
consumers, as well as a <strong>reducer</strong>. The two consumers can be fed
items independently, and when they are done the reducer is used to
combine their two results into one. See <a href="https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md">the <code>plumbing</code>
README</a> for further details.</dd><dt><a class="trait" href="trait.Folder.html" title="trait rayon::iter::plumbing::Folder">Folder</a></dt><dd>The <code>Folder</code> trait encapsulates <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.fold" title="method core::iter::traits::iterator::Iterator::fold">the standard fold
operation</a>. It can be fed many items using the <code>consume</code>
method. At the end, once all items have been consumed, it can then
be converted (using <code>complete</code>) into a final value.</dd><dt><a class="trait" href="trait.Producer.html" title="trait rayon::iter::plumbing::Producer">Producer</a></dt><dd>A <code>Producer</code> is effectively a “splittable <code>IntoIterator</code>”. That
is, a producer is a value which can be converted into an iterator
at any time: at that point, it simply produces items on demand,
like any iterator. But what makes a <code>Producer</code> special is that,
<em>before</em> we convert to an iterator, we can also <strong>split</strong> it at a
particular point using the <code>split_at</code> method. This will yield up
two producers, one producing the items before that point, and one
producing the items after that point (these two producers can then
independently be split further, or be converted into iterators).
In Rayon, this splitting is used to divide between threads.
See <a href="https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md">the <code>plumbing</code> README</a> for further details.</dd><dt><a class="trait" href="trait.ProducerCallback.html" title="trait rayon::iter::plumbing::ProducerCallback">Producer<wbr>Callback</a></dt><dd>The <code>ProducerCallback</code> trait is a kind of generic closure,
<a href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">analogous to <code>FnOnce</code></a>. See <a href="https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md#producer-callback">the corresponding section in
the plumbing README</a> for more details.</dd><dt><a class="trait" href="trait.Reducer.html" title="trait rayon::iter::plumbing::Reducer">Reducer</a></dt><dd>The reducer is the final step of a <code>Consumer</code> after a consumer
has been split into two parts, and each of those parts has been
fully processed, we are left with two results. The reducer is then
used to combine those two results into one. See <a href="https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md">the <code>plumbing</code>
README</a> for further details.</dd><dt><a class="trait" href="trait.UnindexedConsumer.html" title="trait rayon::iter::plumbing::UnindexedConsumer">Unindexed<wbr>Consumer</a></dt><dd>A stateless consumer can be freely copied. These consumers can be
used like regular consumers, but they also support a
<code>split_off_left</code> method that does not take an index to split, but
simply splits at some arbitrary point (<code>for_each</code>, for example,
produces an unindexed consumer).</dd><dt><a class="trait" href="trait.UnindexedProducer.html" title="trait rayon::iter::plumbing::UnindexedProducer">Unindexed<wbr>Producer</a></dt><dd>A variant on <code>Producer</code> which does not know its exact length or
cannot represent it in a <code>usize</code>. These producers act like
ordinary producers except that they cannot be told to split at a
particular point. Instead, you just ask them to split somewhere.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.bridge.html" title="fn rayon::iter::plumbing::bridge">bridge</a></dt><dd>This helper function is used to “connect” a parallel iterator to a
consumer. It will convert the <code>par_iter</code> into a producer P and
then pull items from P and feed them to <code>consumer</code>, splitting and
creating parallel threads as needed.</dd><dt><a class="fn" href="fn.bridge_producer_consumer.html" title="fn rayon::iter::plumbing::bridge_producer_consumer">bridge_<wbr>producer_<wbr>consumer</a></dt><dd>This helper function is used to “connect” a producer and a
consumer. You may prefer to call <a href="fn.bridge.html" title="fn rayon::iter::plumbing::bridge"><code>bridge()</code></a>, which wraps this
function. This function will draw items from <code>producer</code> and feed
them to <code>consumer</code>, splitting and creating parallel tasks when
needed.</dd><dt><a class="fn" href="fn.bridge_unindexed.html" title="fn rayon::iter::plumbing::bridge_unindexed">bridge_<wbr>unindexed</a></dt><dd>A variant of <a href="fn.bridge_producer_consumer.html" title="fn rayon::iter::plumbing::bridge_producer_consumer"><code>bridge_producer_consumer()</code></a> where the producer is an unindexed producer.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"fn":["bridge","bridge_producer_consumer","bridge_unindexed"],"trait":["Consumer","Folder","Producer","ProducerCallback","Reducer","UnindexedConsumer","UnindexedProducer"]};

View File

@@ -0,0 +1,30 @@
<!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="A consumer is effectively a generalized “fold” operation, and in fact each consumer will eventually be converted into a `Folder`. What makes a consumer special is that, like a `Producer`, it can be split into multiple consumers using the `split_at` method. When a consumer is split, it produces two consumers, as well as a reducer. The two consumers can be fed items independently, and when they are done the reducer is used to combine their two results into one. See the `plumbing` README for further details."><title>Consumer in rayon::iter::plumbing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.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]--><rustdoc-topbar><h2><a href="#">Consumer</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Consumer</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Folder" title="Folder">Folder</a></li><li><a href="#associatedtype.Reducer" title="Reducer">Reducer</a></li><li><a href="#associatedtype.Result" title="Result">Result</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.full" title="full">full</a></li><li><a href="#tymethod.into_folder" title="into_folder">into_folder</a></li><li><a href="#tymethod.split_at" title="split_at">split_at</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter::<wbr>plumbing</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">rayon</a>::<wbr><a href="../index.html">iter</a>::<wbr><a href="index.html">plumbing</a></div><h1>Trait <span class="trait">Consumer</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/rayon/iter/plumbing/mod.rs.html#123-146">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Consumer&lt;Item&gt;: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
type <a href="#associatedtype.Folder" class="associatedtype">Folder</a>: <a class="trait" href="trait.Folder.html" title="trait rayon::iter::plumbing::Folder">Folder</a>&lt;Item, Result = Self::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a>&gt;;
type <a href="#associatedtype.Reducer" class="associatedtype">Reducer</a>: <a class="trait" href="trait.Reducer.html" title="trait rayon::iter::plumbing::Reducer">Reducer</a>&lt;Self::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a>&gt;;
type <a href="#associatedtype.Result" class="associatedtype">Result</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>;
// Required methods
fn <a href="#tymethod.split_at" class="fn">split_at</a>(self, index: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; (Self, Self, Self::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Reducer" title="type rayon::iter::plumbing::Consumer::Reducer">Reducer</a>);
<span class="item-spacer"></span> fn <a href="#tymethod.into_folder" class="fn">into_folder</a>(self) -&gt; Self::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Folder" title="type rayon::iter::plumbing::Consumer::Folder">Folder</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.full" class="fn">full</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A consumer is effectively a <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.fold" title="method core::iter::traits::iterator::Iterator::fold">generalized “fold” operation</a>,
and in fact each consumer will eventually be converted into a
<a href="trait.Folder.html" title="trait rayon::iter::plumbing::Folder"><code>Folder</code></a>. What makes a consumer special is that, like a
<a href="trait.Producer.html" title="trait rayon::iter::plumbing::Producer"><code>Producer</code></a>, it can be <strong>split</strong> into multiple consumers using
the <code>split_at</code> method. When a consumer is split, it produces two
consumers, as well as a <strong>reducer</strong>. The two consumers can be fed
items independently, and when they are done the reducer is used to
combine their two results into one. See <a href="https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md">the <code>plumbing</code>
README</a> for further details.</p>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Folder" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#125">Source</a><h4 class="code-header">type <a href="#associatedtype.Folder" class="associatedtype">Folder</a>: <a class="trait" href="trait.Folder.html" title="trait rayon::iter::plumbing::Folder">Folder</a>&lt;Item, Result = Self::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a>&gt;</h4></section></summary><div class="docblock"><p>The type of folder that this consumer can be converted into.</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.Reducer" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#128">Source</a><h4 class="code-header">type <a href="#associatedtype.Reducer" class="associatedtype">Reducer</a>: <a class="trait" href="trait.Reducer.html" title="trait rayon::iter::plumbing::Reducer">Reducer</a>&lt;Self::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a>&gt;</h4></section></summary><div class="docblock"><p>The type of reducer that is produced if this consumer is split.</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.Result" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#131">Source</a><h4 class="code-header">type <a href="#associatedtype.Result" class="associatedtype">Result</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a></h4></section></summary><div class="docblock"><p>The type of result that this consumer will ultimately produce.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.split_at" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#137">Source</a><h4 class="code-header">fn <a href="#tymethod.split_at" class="fn">split_at</a>(self, index: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; (Self, Self, Self::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Reducer" title="type rayon::iter::plumbing::Consumer::Reducer">Reducer</a>)</h4></section></summary><div class="docblock"><p>Divide the consumer into two consumers, one processing items
<code>0..index</code> and one processing items from <code>index..</code>. Also
produces a reducer that can be used to reduce the results at
the end.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.into_folder" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#141">Source</a><h4 class="code-header">fn <a href="#tymethod.into_folder" class="fn">into_folder</a>(self) -&gt; Self::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Folder" title="type rayon::iter::plumbing::Consumer::Folder">Folder</a></h4></section></summary><div class="docblock"><p>Convert the consumer into a folder that can consume items
sequentially, eventually producing a final result.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.full" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#145">Source</a><h4 class="code-header">fn <a href="#tymethod.full" class="fn">full</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Hint whether this <code>Consumer</code> would like to stop processing
further items, e.g. if a search has been completed.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.93.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/rayon/iter/plumbing/trait.Consumer.js" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,28 @@
<!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="The `Folder` trait encapsulates the standard fold operation. It can be fed many items using the `consume` method. At the end, once all items have been consumed, it can then be converted (using `complete`) into a final value."><title>Folder in rayon::iter::plumbing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.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]--><rustdoc-topbar><h2><a href="#">Folder</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Folder</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Result" title="Result">Result</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.complete" title="complete">complete</a></li><li><a href="#tymethod.consume" title="consume">consume</a></li><li><a href="#tymethod.full" title="full">full</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.consume_iter" title="consume_iter">consume_iter</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter::<wbr>plumbing</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">rayon</a>::<wbr><a href="../index.html">iter</a>::<wbr><a href="index.html">plumbing</a></div><h1>Trait <span class="trait">Folder</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/rayon/iter/plumbing/mod.rs.html#154-188">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Folder&lt;Item&gt;: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
type <a href="#associatedtype.Result" class="associatedtype">Result</a>;
// Required methods
fn <a href="#tymethod.consume" class="fn">consume</a>(self, item: Item) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.complete" class="fn">complete</a>(self) -&gt; Self::<a class="associatedtype" href="trait.Folder.html#associatedtype.Result" title="type rayon::iter::plumbing::Folder::Result">Result</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.full" class="fn">full</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>;
// Provided method
fn <a href="#method.consume_iter" class="fn">consume_iter</a>&lt;I&gt;(self, iter: I) -&gt; Self
<span class="where">where I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = Item&gt;</span> { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The <code>Folder</code> trait encapsulates <a href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#method.fold" title="method core::iter::traits::iterator::Iterator::fold">the standard fold
operation</a>. It can be fed many items using the <code>consume</code>
method. At the end, once all items have been consumed, it can then
be converted (using <code>complete</code>) into a final value.</p>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Result" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#156">Source</a><h4 class="code-header">type <a href="#associatedtype.Result" class="associatedtype">Result</a></h4></section></summary><div class="docblock"><p>The type of result that will ultimately be produced by the folder.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.consume" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#159">Source</a><h4 class="code-header">fn <a href="#tymethod.consume" class="fn">consume</a>(self, item: Item) -&gt; Self</h4></section></summary><div class="docblock"><p>Consume next item and return new sequential state.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.complete" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#183">Source</a><h4 class="code-header">fn <a href="#tymethod.complete" class="fn">complete</a>(self) -&gt; Self::<a class="associatedtype" href="trait.Folder.html#associatedtype.Result" title="type rayon::iter::plumbing::Folder::Result">Result</a></h4></section></summary><div class="docblock"><p>Finish consuming items, produce final result.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.full" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#187">Source</a><h4 class="code-header">fn <a href="#tymethod.full" class="fn">full</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Hint whether this <code>Folder</code> would like to stop processing
further items, e.g. if a search has been completed.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.consume_iter" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#169-180">Source</a><h4 class="code-header">fn <a href="#method.consume_iter" class="fn">consume_iter</a>&lt;I&gt;(self, iter: I) -&gt; Self<div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = Item&gt;,</div></h4></section></summary><div class="docblock"><p>Consume items from the iterator until full, and return new sequential state.</p>
<p>This method is <strong>optional</strong>. The default simply iterates over
<code>iter</code>, invoking <code>consume</code> and checking after each iteration
whether <code>full</code> returns false.</p>
<p>The main reason to override it is if you can provide a more
specialized, efficient implementation.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.93.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/rayon/iter/plumbing/trait.Folder.js" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,59 @@
<!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="A `Producer` is effectively a “splittable `IntoIterator`”. That is, a producer is a value which can be converted into an iterator at any time: at that point, it simply produces items on demand, like any iterator. But what makes a `Producer` special is that, before we convert to an iterator, we can also split it at a particular point using the `split_at` method. This will yield up two producers, one producing the items before that point, and one producing the items after that point (these two producers can then independently be split further, or be converted into iterators). In Rayon, this splitting is used to divide between threads. See the `plumbing` README for further details."><title>Producer in rayon::iter::plumbing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.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]--><rustdoc-topbar><h2><a href="#">Producer</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Producer</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.IntoIter" title="IntoIter">IntoIter</a></li><li><a href="#associatedtype.Item" title="Item">Item</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.into_iter" title="into_iter">into_iter</a></li><li><a href="#tymethod.split_at" title="split_at">split_at</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.fold_with" title="fold_with">fold_with</a></li><li><a href="#method.max_len" title="max_len">max_len</a></li><li><a href="#method.min_len" title="min_len">min_len</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter::<wbr>plumbing</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">rayon</a>::<wbr><a href="../index.html">iter</a>::<wbr><a href="index.html">plumbing</a></div><h1>Trait <span class="trait">Producer</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/rayon/iter/plumbing/mod.rs.html#56-109">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Producer: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
type <a href="#associatedtype.Item" class="associatedtype">Item</a>;
type <a href="#associatedtype.IntoIter" class="associatedtype">IntoIter</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = Self::<a class="associatedtype" href="trait.Producer.html#associatedtype.Item" title="type rayon::iter::plumbing::Producer::Item">Item</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/exact_size/trait.ExactSizeIterator.html" title="trait core::iter::traits::exact_size::ExactSizeIterator">ExactSizeIterator</a>;
// Required methods
fn <a href="#tymethod.into_iter" class="fn">into_iter</a>(self) -&gt; Self::<a class="associatedtype" href="trait.Producer.html#associatedtype.IntoIter" title="type rayon::iter::plumbing::Producer::IntoIter">IntoIter</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.split_at" class="fn">split_at</a>(self, index: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; (Self, Self);
// Provided methods
fn <a href="#method.min_len" class="fn">min_len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.max_len" class="fn">max_len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.fold_with" class="fn">fold_with</a>&lt;F&gt;(self, folder: F) -&gt; F
<span class="where">where F: <a class="trait" href="trait.Folder.html" title="trait rayon::iter::plumbing::Folder">Folder</a>&lt;Self::<a class="associatedtype" href="trait.Producer.html#associatedtype.Item" title="type rayon::iter::plumbing::Producer::Item">Item</a>&gt;</span> { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>Producer</code> is effectively a “splittable <code>IntoIterator</code>”. That
is, a producer is a value which can be converted into an iterator
at any time: at that point, it simply produces items on demand,
like any iterator. But what makes a <code>Producer</code> special is that,
<em>before</em> we convert to an iterator, we can also <strong>split</strong> it at a
particular point using the <code>split_at</code> method. This will yield up
two producers, one producing the items before that point, and one
producing the items after that point (these two producers can then
independently be split further, or be converted into iterators).
In Rayon, this splitting is used to divide between threads.
See <a href="https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md">the <code>plumbing</code> README</a> for further details.</p>
<p>Note that each producer will always produce a fixed number of
items N. However, this number N is not queryable through the API;
the consumer is expected to track it.</p>
<p>NB. You might expect <code>Producer</code> to extend the <code>IntoIterator</code>
trait. However, <a href="https://github.com/rust-lang/rust/issues/20671">rust-lang/rust#20671</a> prevents us from
declaring the DoubleEndedIterator and ExactSizeIterator
constraints on a required IntoIterator trait, so we inline
IntoIterator here until that issue is fixed.</p>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Item" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#59">Source</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a></h4></section></summary><div class="docblock"><p>The type of item that will be produced by this producer once
it is converted into an iterator.</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#62">Source</a><h4 class="code-header">type <a href="#associatedtype.IntoIter" class="associatedtype">IntoIter</a>: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = Self::<a class="associatedtype" href="trait.Producer.html#associatedtype.Item" title="type rayon::iter::plumbing::Producer::Item">Item</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/iter/traits/exact_size/trait.ExactSizeIterator.html" title="trait core::iter::traits::exact_size::ExactSizeIterator">ExactSizeIterator</a></h4></section></summary><div class="docblock"><p>The type of iterator we will become.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.into_iter" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#66">Source</a><h4 class="code-header">fn <a href="#tymethod.into_iter" class="fn">into_iter</a>(self) -&gt; Self::<a class="associatedtype" href="trait.Producer.html#associatedtype.IntoIter" title="type rayon::iter::plumbing::Producer::IntoIter">IntoIter</a></h4></section></summary><div class="docblock"><p>Convert <code>self</code> into an iterator; at this point, no more parallel splits
are possible.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.split_at" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#97">Source</a><h4 class="code-header">fn <a href="#tymethod.split_at" class="fn">split_at</a>(self, index: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>) -&gt; (Self, Self)</h4></section></summary><div class="docblock"><p>Split into two producers; one produces items <code>0..index</code>, the
other <code>index..N</code>. Index must be less than or equal to <code>N</code>.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.min_len" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#78-80">Source</a><h4 class="code-header">fn <a href="#method.min_len" class="fn">min_len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>The minimum number of items that we will process
sequentially. Defaults to 1, which means that we will split
all the way down to a single item. This can be raised higher
using the <a href="../trait.IndexedParallelIterator.html#method.with_min_len" title="method rayon::iter::IndexedParallelIterator::with_min_len"><code>with_min_len</code></a> method, which will force us to
create sequential tasks at a larger granularity. Note that
Rayon automatically normally attempts to adjust the size of
parallel splits to reduce overhead, so this should not be
needed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.max_len" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#91-93">Source</a><h4 class="code-header">fn <a href="#method.max_len" class="fn">max_len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>The maximum number of items that we will process
sequentially. Defaults to MAX, which means that we can choose
not to split at all. This can be lowered using the
<a href="../trait.IndexedParallelIterator.html#method.with_max_len" title="method rayon::iter::IndexedParallelIterator::with_max_len"><code>with_max_len</code></a> method, which will force us to create more
parallel tasks. Note that Rayon automatically normally
attempts to adjust the size of parallel splits to reduce
overhead, so this should not be needed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.fold_with" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#103-108">Source</a><h4 class="code-header">fn <a href="#method.fold_with" class="fn">fold_with</a>&lt;F&gt;(self, folder: F) -&gt; F<div class="where">where
F: <a class="trait" href="trait.Folder.html" title="trait rayon::iter::plumbing::Folder">Folder</a>&lt;Self::<a class="associatedtype" href="trait.Producer.html#associatedtype.Item" title="type rayon::iter::plumbing::Producer::Item">Item</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Iterate the producer, feeding each element to <code>folder</code>, and
stop when the folder is full (or all elements have been consumed).</p>
<p>The provided implementation is sufficient for most iterables.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.93.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/rayon/iter/plumbing/trait.Producer.js" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,16 @@
<!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="The `ProducerCallback` trait is a kind of generic closure, analogous to `FnOnce`. See the corresponding section in the plumbing README for more details."><title>ProducerCallback in rayon::iter::plumbing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.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]--><rustdoc-topbar><h2><a href="#">ProducerCallback</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Producer<wbr>Callback</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Output" title="Output">Output</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.callback" title="callback">callback</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter::<wbr>plumbing</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">rayon</a>::<wbr><a href="../index.html">iter</a>::<wbr><a href="index.html">plumbing</a></div><h1>Trait <span class="trait">Producer<wbr>Callback</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/rayon/iter/plumbing/mod.rs.html#17-30">Source</a> </span></div><pre class="rust item-decl"><code>pub trait ProducerCallback&lt;T&gt; {
type <a href="#associatedtype.Output" class="associatedtype">Output</a>;
// Required method
fn <a href="#tymethod.callback" class="fn">callback</a>&lt;P&gt;(self, producer: P) -&gt; Self::<a class="associatedtype" href="trait.ProducerCallback.html#associatedtype.Output" title="type rayon::iter::plumbing::ProducerCallback::Output">Output</a>
<span class="where">where P: <a class="trait" href="trait.Producer.html" title="trait rayon::iter::plumbing::Producer">Producer</a>&lt;Item = T&gt;</span>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The <code>ProducerCallback</code> trait is a kind of generic closure,
<a href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">analogous to <code>FnOnce</code></a>. See <a href="https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md#producer-callback">the corresponding section in
the plumbing README</a> for more details.</p>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Output" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#22">Source</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a></h4></section></summary><div class="docblock"><p>The type of value returned by this callback. Analogous to
<a href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.FnOnce.html#associatedtype.Output" title="associated type core::ops::function::FnOnce::Output"><code>Output</code> from the <code>FnOnce</code> trait</a>.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.callback" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#27-29">Source</a><h4 class="code-header">fn <a href="#tymethod.callback" class="fn">callback</a>&lt;P&gt;(self, producer: P) -&gt; Self::<a class="associatedtype" href="trait.ProducerCallback.html#associatedtype.Output" title="type rayon::iter::plumbing::ProducerCallback::Output">Output</a><div class="where">where
P: <a class="trait" href="trait.Producer.html" title="trait rayon::iter::plumbing::Producer">Producer</a>&lt;Item = T&gt;,</div></h4></section></summary><div class="docblock"><p>Invokes the callback with the given producer as argument. The
key point of this trait is that this method is generic over
<code>P</code>, and hence implementors must be defined for any producer.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.93.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/rayon/iter/plumbing/trait.ProducerCallback.js" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!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="The reducer is the final step of a `Consumer` after a consumer has been split into two parts, and each of those parts has been fully processed, we are left with two results. The reducer is then used to combine those two results into one. See the `plumbing` README for further details."><title>Reducer in rayon::iter::plumbing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.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]--><rustdoc-topbar><h2><a href="#">Reducer</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Reducer</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.reduce" title="reduce">reduce</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter::<wbr>plumbing</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">rayon</a>::<wbr><a href="../index.html">iter</a>::<wbr><a href="index.html">plumbing</a></div><h1>Trait <span class="trait">Reducer</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/rayon/iter/plumbing/mod.rs.html#197-201">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Reducer&lt;Result&gt; {
// Required method
fn <a href="#tymethod.reduce" class="fn">reduce</a>(self, left: Result, right: Result) -&gt; Result;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The reducer is the final step of a <code>Consumer</code> after a consumer
has been split into two parts, and each of those parts has been
fully processed, we are left with two results. The reducer is then
used to combine those two results into one. See <a href="https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md">the <code>plumbing</code>
README</a> for further details.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.reduce" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#200">Source</a><h4 class="code-header">fn <a href="#tymethod.reduce" class="fn">reduce</a>(self, left: Result, right: Result) -&gt; Result</h4></section></summary><div class="docblock"><p>Reduce two final results into one; this is executed after a
split.</p>
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/rayon/iter/plumbing/trait.Reducer.js" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,19 @@
<!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="A stateless consumer can be freely copied. These consumers can be used like regular consumers, but they also support a `split_off_left` method that does not take an index to split, but simply splits at some arbitrary point (`for_each`, for example, produces an unindexed consumer)."><title>UnindexedConsumer in rayon::iter::plumbing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.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]--><rustdoc-topbar><h2><a href="#">UnindexedConsumer</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Unindexed<wbr>Consumer</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.split_off_left" title="split_off_left">split_off_left</a></li><li><a href="#tymethod.to_reducer" title="to_reducer">to_reducer</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter::<wbr>plumbing</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">rayon</a>::<wbr><a href="../index.html">iter</a>::<wbr><a href="index.html">plumbing</a></div><h1>Trait <span class="trait">Unindexed<wbr>Consumer</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/rayon/iter/plumbing/mod.rs.html#208-221">Source</a> </span></div><pre class="rust item-decl"><code>pub trait UnindexedConsumer&lt;I&gt;: <a class="trait" href="trait.Consumer.html" title="trait rayon::iter::plumbing::Consumer">Consumer</a>&lt;I&gt; {
// Required methods
fn <a href="#tymethod.split_off_left" class="fn">split_off_left</a>(&amp;self) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.to_reducer" class="fn">to_reducer</a>(&amp;self) -&gt; Self::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Reducer" title="type rayon::iter::plumbing::Consumer::Reducer">Reducer</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A stateless consumer can be freely copied. These consumers can be
used like regular consumers, but they also support a
<code>split_off_left</code> method that does not take an index to split, but
simply splits at some arbitrary point (<code>for_each</code>, for example,
produces an unindexed consumer).</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.split_off_left" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#216">Source</a><h4 class="code-header">fn <a href="#tymethod.split_off_left" class="fn">split_off_left</a>(&amp;self) -&gt; Self</h4></section></summary><div class="docblock"><p>Splits off a “left” consumer and returns it. The <code>self</code>
consumer should then be used to consume the “right” portion of
the data. (The ordering matters for methods like find_first
values produced by the returned value are given precedence
over values produced by <code>self</code>.) Once the left and right
halves have been fully consumed, you should reduce the results
with the result of <code>to_reducer</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.to_reducer" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#220">Source</a><h4 class="code-header">fn <a href="#tymethod.to_reducer" class="fn">to_reducer</a>(&amp;self) -&gt; Self::<a class="associatedtype" href="trait.Consumer.html#associatedtype.Reducer" title="type rayon::iter::plumbing::Consumer::Reducer">Reducer</a></h4></section></summary><div class="docblock"><p>Creates a reducer that can be used to combine the results from
a split consumer.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.93.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/rayon/iter/plumbing/trait.UnindexedConsumer.js" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,20 @@
<!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="A variant on `Producer` which does not know its exact length or cannot represent it in a `usize`. These producers act like ordinary producers except that they cannot be told to split at a particular point. Instead, you just ask them to split somewhere."><title>UnindexedProducer in rayon::iter::plumbing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="rayon" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.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]--><rustdoc-topbar><h2><a href="#">UnindexedProducer</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../rayon/index.html">rayon</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Unindexed<wbr>Producer</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Item" title="Item">Item</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.fold_with" title="fold_with">fold_with</a></li><li><a href="#tymethod.split" title="split">split</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In rayon::<wbr>iter::<wbr>plumbing</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">rayon</a>::<wbr><a href="../index.html">iter</a>::<wbr><a href="index.html">plumbing</a></div><h1>Trait <span class="trait">Unindexed<wbr>Producer</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/rayon/iter/plumbing/mod.rs.html#231-243">Source</a> </span></div><pre class="rust item-decl"><code>pub trait UnindexedProducer: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
type <a href="#associatedtype.Item" class="associatedtype">Item</a>;
// Required methods
fn <a href="#tymethod.split" class="fn">split</a>(self) -&gt; (Self, <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self&gt;);
<span class="item-spacer"></span> fn <a href="#tymethod.fold_with" class="fn">fold_with</a>&lt;F&gt;(self, folder: F) -&gt; F
<span class="where">where F: <a class="trait" href="trait.Folder.html" title="trait rayon::iter::plumbing::Folder">Folder</a>&lt;Self::<a class="associatedtype" href="trait.UnindexedProducer.html#associatedtype.Item" title="type rayon::iter::plumbing::UnindexedProducer::Item">Item</a>&gt;</span>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A variant on <code>Producer</code> which does not know its exact length or
cannot represent it in a <code>usize</code>. These producers act like
ordinary producers except that they cannot be told to split at a
particular point. Instead, you just ask them to split somewhere.</p>
<p>(In principle, <code>Producer</code> could extend this trait; however, it
does not because to do so would require producers to carry their
own length with them.)</p>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Item" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#233">Source</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a></h4></section></summary><div class="docblock"><p>The type of item returned by this producer.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.split" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#236">Source</a><h4 class="code-header">fn <a href="#tymethod.split" class="fn">split</a>(self) -&gt; (Self, <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self&gt;)</h4></section></summary><div class="docblock"><p>Split midway into a new producer if possible, otherwise return <code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.fold_with" class="method"><a class="src rightside" href="../../../src/rayon/iter/plumbing/mod.rs.html#240-242">Source</a><h4 class="code-header">fn <a href="#tymethod.fold_with" class="fn">fold_with</a>&lt;F&gt;(self, folder: F) -&gt; F<div class="where">where
F: <a class="trait" href="trait.Folder.html" title="trait rayon::iter::plumbing::Folder">Folder</a>&lt;Self::<a class="associatedtype" href="trait.UnindexedProducer.html#associatedtype.Item" title="type rayon::iter::plumbing::UnindexedProducer::Item">Item</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Iterate the producer, feeding each element to <code>folder</code>, and
stop when the folder is full (or all elements have been consumed).</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.93.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/rayon/iter/plumbing/trait.UnindexedProducer.js" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Positions.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Positions.html">../../../rayon/iter/struct.Positions.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Positions.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/fn.repeat.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/fn.repeat.html">../../../rayon/iter/fn.repeat.html</a>...</p>
<script>location.replace("../../../rayon/iter/fn.repeat.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/fn.repeat_n.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/fn.repeat_n.html">../../../rayon/iter/fn.repeat_n.html</a>...</p>
<script>location.replace("../../../rayon/iter/fn.repeat_n.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/fn.repeatn.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/fn.repeatn.html">../../../rayon/iter/fn.repeatn.html</a>...</p>
<script>location.replace("../../../rayon/iter/fn.repeatn.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Repeat.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Repeat.html">../../../rayon/iter/struct.Repeat.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Repeat.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.RepeatN.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.RepeatN.html">../../../rayon/iter/struct.RepeatN.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.RepeatN.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Rev.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Rev.html">../../../rayon/iter/struct.Rev.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Rev.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["Either"],"fn":["empty","once","repeat","repeat_n","repeatn","split","walk_tree","walk_tree_postfix","walk_tree_prefix"],"mod":["plumbing"],"struct":["Chain","Chunks","Cloned","Copied","Empty","Enumerate","ExponentialBlocks","Filter","FilterMap","FlatMap","FlatMapIter","Flatten","FlattenIter","Fold","FoldChunks","FoldChunksWith","FoldWith","Inspect","Interleave","InterleaveShortest","Intersperse","IterBridge","Map","MapInit","MapWith","MaxLen","MinLen","MultiZip","Once","PanicFuse","Positions","Repeat","RepeatN","Rev","Skip","SkipAny","SkipAnyWhile","Split","StepBy","Take","TakeAny","TakeAnyWhile","TryFold","TryFoldWith","UniformBlocks","Update","WalkTree","WalkTreePostfix","WalkTreePrefix","WhileSome","Zip","ZipEq"],"trait":["FromParallelIterator","IndexedParallelIterator","IntoParallelIterator","IntoParallelRefIterator","IntoParallelRefMutIterator","ParallelBridge","ParallelDrainFull","ParallelDrainRange","ParallelExtend","ParallelIterator"]};

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Skip.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Skip.html">../../../rayon/iter/struct.Skip.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Skip.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.SkipAny.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.SkipAny.html">../../../rayon/iter/struct.SkipAny.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.SkipAny.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.SkipAnyWhile.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.SkipAnyWhile.html">../../../rayon/iter/struct.SkipAnyWhile.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.SkipAnyWhile.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/fn.split.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/fn.split.html">../../../rayon/iter/fn.split.html</a>...</p>
<script>location.replace("../../../rayon/iter/fn.split.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.Split.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.Split.html">../../../rayon/iter/struct.Split.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.Split.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../rayon/iter/struct.StepBy.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../rayon/iter/struct.StepBy.html">../../../rayon/iter/struct.StepBy.html</a>...</p>
<script>location.replace("../../../rayon/iter/struct.StepBy.html" + location.search + location.hash);</script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More