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,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>