|
|
|
|
<!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="API documentation for the Rust `IndexedParallelIterator` trait in crate `rayon`."><meta name="keywords" content="rust, rustlang, rust-lang, IndexedParallelIterator"><title>rayon::iter::IndexedParallelIterator - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../rayon/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Trait IndexedParallelIterator</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.drive">drive</a><a href="#tymethod.len">len</a><a href="#tymethod.with_producer">with_producer</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.chunks">chunks</a><a href="#method.cmp">cmp</a><a href="#method.collect_into_vec">collect_into_vec</a><a href="#method.enumerate">enumerate</a><a href="#method.eq">eq</a><a href="#method.ge">ge</a><a href="#method.gt">gt</a><a href="#method.interleave">interleave</a><a href="#method.interleave_shortest">interleave_shortest</a><a href="#method.le">le</a><a href="#method.lt">lt</a><a href="#method.ne">ne</a><a href="#method.partial_cmp">partial_cmp</a><a href="#method.position_any">position_any</a><a href="#method.position_first">position_first</a><a href="#method.position_last">position_last</a><a href="#method.rev">rev</a><a href="#method.skip">skip</a><a href="#method.take">take</a><a href="#method.unzip_into_vecs">unzip_into_vecs</a><a href="#method.with_max_len">with_max_len</a><a href="#method.with_min_len">with_min_len</a><a href="#method.zip">zip</a><a href="#method.zip_eq">zip_eq</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>rayon</a>::<wbr><a href='index.html'>iter</a></p><script>window.sidebarCurrent = {name: 'IndexedParallelIterator', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/rayon/iter/mod.rs.html#1988-2567' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>rayon</a>::<wbr><a href='
|
|
|
|
|
fn <a href='#tymethod.len' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#tymethod.drive' class='fnname'>drive</a><C: <a class="trait" href="../../rayon/iter/plumbing/trait.Consumer.html" title="trait rayon::iter::plumbing::Consumer">Consumer</a><Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>>(self, consumer: C) -> C::<a class="type" href="../../rayon/iter/plumbing/trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a>;
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#tymethod.with_producer' class='fnname'>with_producer</a><CB: <a class="trait" href="../../rayon/iter/plumbing/trait.ProducerCallback.html" title="trait rayon::iter::plumbing::ProducerCallback">ProducerCallback</a><Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>>(<br> self, <br> callback: CB<br> ) -> CB::<a class="type" href="../../rayon/iter/plumbing/trait.ProducerCallback.html#associatedtype.Output" title="type rayon::iter::plumbing::ProducerCallback::Output">Output</a>;
|
|
|
|
|
|
|
|
|
|
fn <a href='#method.collect_into_vec' class='fnname'>collect_into_vec</a>(self, target: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>) { ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.unzip_into_vecs' class='fnname'>unzip_into_vecs</a><A, B>(self, left: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><A>, right: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><B>)<br> <span class="where">where<br> Self: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A, B<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>,<br> A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.zip' class='fnname'>zip</a><Z>(self, zip_op: Z) -> <a class="struct" href="../../rayon/iter/struct.Zip.html" title="struct rayon::iter::Zip">Zip</a><Self, Z::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>><br> <span class="where">where<br> Z: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> Z::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.zip_eq' class='fnname'>zip_eq</a><Z>(self, zip_op: Z) -> <a class="struct" href="../../rayon/iter/struct.ZipEq.html" title="struct rayon::iter::ZipEq">ZipEq</a><Self, Z::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>><br> <span class="where">where<br> Z: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> Z::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.interleave' class='fnname'>interleave</a><I>(self, other: I) -> <a class="struct" href="../../rayon/iter/struct.Interleave.html" title="struct rayon::iter::Interleave">Interleave</a><Self, I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>><br> <span class="where">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a><Item = Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a><Item = Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.interleave_shortest' class='fnname'>interleave_shortest</a><I>(<br> self, <br> other: I<br> ) -> <a class="struct" href="../../rayon/iter/struct.InterleaveShortest.html" title="struct rayon::iter::InterleaveShortest">InterleaveShortest</a><Self, I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>><br> <span class="where">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a><Item = Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a><Item = Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.chunks' class='fnname'>chunks</a>(self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../rayon/iter/struct.Chunks.html" title="struct rayon::iter::Chunks">Chunks</a><Self> { ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.cmp' class='fnname'>cmp</a><I>(self, other: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a><br> <span class="where">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a><Item = Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.partial_cmp' class='fnname'>partial_cmp</a><I>(self, other: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>><br> <span class="where">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.eq' class='fnname'>eq</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br> <span class="where">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.ne' class='fnname'>ne</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br> <span class="where">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.lt' class='fnname'>lt</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br> <span class="where">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.le' class='fnname'>le</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br> <span class="where">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.gt' class='fnname'>gt</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br> <span class="where">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.ge' class='fnname'>ge</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br> <span class="where">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.enumerate' class='fnname'>enumerate</a>(self) -> <a class="struct" href="../../rayon/iter/struct.Enumerate.html" title="struct rayon::iter::Enumerate">Enumerate</a><Self> { ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.skip' class='fnname'>skip</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../rayon/iter/struct.Skip.html" title="struct rayon::iter::Skip">Skip</a><Self> { ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.take' class='fnname'>take</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../rayon/iter/struct.Take.html" title="struct rayon::iter::Take">Take</a><Self> { ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.position_any' class='fnname'>position_any</a><P>(self, predicate: P) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>><br> <span class="where">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.position_first' class='fnname'>position_first</a><P>(self, predicate: P) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>><br> <span class="where">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.position_last' class='fnname'>position_last</a><P>(self, predicate: P) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>><br> <span class="where">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a></span>,
|
|
|
|
|
{ ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.rev' class='fnname'>rev</a>(self) -> <a class="struct" href="../../rayon/iter/struct.Rev.html" title="struct rayon::iter::Rev">Rev</a><Self> { ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.with_min_len' class='fnname'>with_min_len</a>(self, min: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../rayon/iter/struct.MinLen.html" title="struct rayon::iter::MinLen">MinLen</a><Self> { ... }
|
|
|
|
|
<div class='item-spacer'></div> fn <a href='#method.with_max_len' class='fnname'>with_max_len</a>(self, max: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../rayon/iter/struct.MaxLen.html" title="struct rayon::iter::MaxLen">MaxLen</a><Self> { ... }
|
|
|
|
|
}</pre></div><div class='docblock'><p>An iterator that supports "random access" to its data, meaning
|
|
|
|
|
that you can split it at arbitrary indices and draw data from
|
|
|
|
|
those points.</p>
|
|
|
|
|
<p><strong>Note:</strong> Not implemented for <code>u64</code>, <code>i64</code>, <code>u128</code>, or <code>i128</code> ranges</p>
|
|
|
|
|
</div>
|
|
|
|
|
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.len' class='method'><code id='len.v'>fn <a href='#tymethod.len' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></h3><div class='docblock'><p>Produces an exact count of how many items this iterator will
|
|
|
|
|
produce, presuming no panic occurs.</p>
|
|
|
|
|
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">par_iter</span> <span class="op">=</span> (<span class="number">0</span>..<span class="number">100</span>).<span class="ident">into_par_iter</span>().<span class="ident">zip</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="number">0</span>; <span class="number">10</span>]);
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">par_iter</span>.<span class="ident">len</span>(), <span class="number">10</span>);
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">vec</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw">_</span><span class="op">></span> <span class="op">=</span> <span class="ident">par_iter</span>.<span class="ident">collect</span>();
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">vec</span>.<span class="ident">len</span>(), <span class="number">10</span>);</pre></div>
|
|
|
|
|
</div><h3 id='tymethod.drive' class='method'><code id='drive.v'>fn <a href='#tymethod.drive' class='fnname'>drive</a><C: <a class="trait" href="../../rayon/iter/plumbing/trait.Consumer.html" title="trait rayon::iter::plumbing::Consumer">Consumer</a><Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>>(self, consumer: C) -> C::<a class="type" href="../../rayon/iter/plumbing/trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a></code></h3><div class='docblock'><p>Internal method used to define the behavior of this parallel
|
|
|
|
|
iterator. You should not need to call this directly.</p>
|
|
|
|
|
<p>This method causes the iterator <code>self</code> to start producing
|
|
|
|
|
items and to feed them to the consumer <code>consumer</code> one by one.
|
|
|
|
|
It may split the consumer before doing so to create the
|
|
|
|
|
opportunity to produce in parallel. If a split does happen, it
|
|
|
|
|
will inform the consumer of the index where the split should
|
|
|
|
|
occur (unlike <code>ParallelIterator::drive_unindexed()</code>).</p>
|
|
|
|
|
<p>See the <a href="README.md">README</a> for more details on the internals of parallel
|
|
|
|
|
iterators.</p>
|
|
|
|
|
</div><h3 id='tymethod.with_producer' class='method'><code id='with_producer.v'>fn <a href='#tymethod.with_producer' class='fnname'>with_producer</a><CB: <a class="trait" href="../../rayon/iter/plumbing/trait.ProducerCallback.html" title="trait rayon::iter::plumbing::ProducerCallback">ProducerCallback</a><Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>>(<br> self, <br> callback: CB<br>) -> CB::<a class="type" href="../../rayon/iter/plumbing/trait.ProducerCallback.html#associatedtype.Output" title="type rayon::iter::plumbing::ProducerCallback::Output">Output</a></code></h3><div class='docblock'><p>Internal method used to define the behavior of this parallel
|
|
|
|
|
iterator. You should not need to call this directly.</p>
|
|
|
|
|
<p>This method converts the iterator into a producer P and then
|
|
|
|
|
invokes <code>callback.callback()</code> with P. Note that the type of
|
|
|
|
|
this producer is not defined as part of the API, since
|
|
|
|
|
<code>callback</code> must be defined generically for all producers. This
|
|
|
|
|
allows the producer type to contain references; it also means
|
|
|
|
|
that parallel iterators can adjust that type without causing a
|
|
|
|
|
breaking change.</p>
|
|
|
|
|
<p>See the <a href="README.md">README</a> for more details on the internals of parallel
|
|
|
|
|
iterators.</p>
|
|
|
|
|
</div></div><span class='loading-content'>Loading content...</span>
|
|
|
|
|
<h2 id='provided-methods' class='small-section-header'>Provided methods<a href='#provided-methods' class='anchor'></a></h2><div class='methods'><h3 id='method.collect_into_vec' class='method'><code id='collect_into_vec.v'>fn <a href='#method.collect_into_vec' class='fnname'>collect_into_vec</a>(self, target: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>)</code></h3><div class='docblock'><p>Collects the results of the iterator into the specified
|
|
|
|
|
vector. The vector is always truncated before execution
|
|
|
|
|
begins. If possible, reusing the vector across calls can lead
|
|
|
|
|
to better performance since it reuses the same backing buffer.</p>
|
|
|
|
|
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="comment">// any prior data will be truncated</span>
|
|
|
|
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">vec</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="op">-</span><span class="number">1</span>, <span class="op">-</span><span class="number">2</span>, <span class="op">-</span><span class="number">3</span>];
|
|
|
|
|
|
|
|
|
|
(<span class="number">0</span>..<span class="number">5</span>).<span class="ident">into_par_iter</span>()
|
|
|
|
|
.<span class="ident">collect_into_vec</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">vec</span>);
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">vec</span>, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</pre></div>
|
|
|
|
|
</div><h3 id='method.unzip_into_vecs' class='method'><code id='unzip_into_vecs.v'>fn <a href='#method.unzip_into_vecs' class='fnname'>unzip_into_vecs</a><A, B>(self, left: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><A>, right: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><B>) <span class="where fmt-newline">where<br> Self: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A, B<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>,<br> A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></code></h3><div class='docblock'><p>Unzips the results of the iterator into the specified
|
|
|
|
|
vectors. The vectors are always truncated before execution
|
|
|
|
|
begins. If possible, reusing the vectors across calls can lead
|
|
|
|
|
to better performance since they reuse the same backing buffer.</p>
|
|
|
|
|
<h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="comment">// any prior data will be truncated</span>
|
|
|
|
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">left</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="number">42</span>; <span class="number">10</span>];
|
|
|
|
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">right</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="op">-</span><span class="number">1</span>; <span class="number">10</span>];
|
|
|
|
|
|
|
|
|
|
(<span class="number">10</span>..<span class="number">15</span>).<span class="ident">into_par_iter</span>()
|
|
|
|
|
.<span class="ident">enumerate</span>()
|
|
|
|
|
.<span class="ident">unzip_into_vecs</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">left</span>, <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">right</span>);
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">left</span>, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">right</span>, [<span class="number">10</span>, <span class="number">11</span>, <span class="number">12</span>, <span class="number">13</span>, <span class="number">14</span>]);</pre></div>
|
|
|
|
|
</div><h3 id='method.zip' class='method'><code id='zip.v'>fn <a href='#method.zip' class='fnname'>zip</a><Z>(self, zip_op: Z) -> <a class="struct" href="../../rayon/iter/struct.Zip.html" title="struct rayon::iter::Zip">Zip</a><Self, Z::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>> <span class="where fmt-newline">where<br> Z: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> Z::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>, </span></code></h3><div class='docblock'><p>Iterate over tuples <code>(A, B)</code>, where the items <code>A</code> are from
|
|
|
|
|
this iterator and <code>B</code> are from the iterator given as argument.
|
|
|
|
|
Like the <code>zip</code> method on ordinary iterators, if the two
|
|
|
|
|
iterators are of unequal length, you only get the items they
|
|
|
|
|
have in common.</p>
|
|
|
|
|
<h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">result</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw">_</span><span class="op">></span> <span class="op">=</span> (<span class="number">1</span>..<span class="number">4</span>)
|
|
|
|
|
.<span class="ident">into_par_iter</span>()
|
|
|
|
|
.<span class="ident">zip</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>])
|
|
|
|
|
.<span class="ident">collect</span>();
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">result</span>, [(<span class="number">1</span>, <span class="string">'a'</span>), (<span class="number">2</span>, <span class="string">'b'</span>), (<span class="number">3</span>, <span class="string">'c'</span>)]);</pre></div>
|
|
|
|
|
</div><h3 id='method.zip_eq' class='method'><code id='zip_eq.v'>fn <a href='#method.zip_eq' class='fnname'>zip_eq</a><Z>(self, zip_op: Z) -> <a class="struct" href="../../rayon/iter/struct.ZipEq.html" title="struct rayon::iter::ZipEq">ZipEq</a><Self, Z::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>> <span class="where fmt-newline">where<br> Z: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> Z::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>, </span></code></h3><div class='docblock'><p>The same as <code>Zip</code>, but requires that both iterators have the same length.</p>
|
|
|
|
|
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
|
|
|
|
<p>Will panic if <code>self</code> and <code>zip_op</code> are not the same length.</p>
|
|
|
|
|
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">one</span> <span class="op">=</span> [<span class="number">1u8</span>];
|
|
|
|
|
<span class="kw">let</span> <span class="ident">two</span> <span class="op">=</span> [<span class="number">2u8</span>, <span class="number">2</span>];
|
|
|
|
|
<span class="kw">let</span> <span class="ident">one_iter</span> <span class="op">=</span> <span class="ident">one</span>.<span class="ident">par_iter</span>();
|
|
|
|
|
<span class="kw">let</span> <span class="ident">two_iter</span> <span class="op">=</span> <span class="ident">two</span>.<span class="ident">par_iter</span>();
|
|
|
|
|
|
|
|
|
|
<span class="comment">// this will panic</span>
|
|
|
|
|
<span class="kw">let</span> <span class="ident">zipped</span>: <span class="ident">Vec</span><span class="op"><</span>(<span class="kw-2">&</span><span class="ident">u8</span>, <span class="kw-2">&</span><span class="ident">u8</span>)<span class="op">></span> <span class="op">=</span> <span class="ident">one_iter</span>.<span class="ident">zip_eq</span>(<span class="ident">two_iter</span>).<span class="ident">collect</span>();
|
|
|
|
|
|
|
|
|
|
<span class="comment">// we should never get here</span>
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">1</span>, <span class="ident">zipped</span>.<span class="ident">len</span>());</pre></div>
|
|
|
|
|
</div><h3 id='method.interleave' class='method'><code id='interleave.v'>fn <a href='#method.interleave' class='fnname'>interleave</a><I>(self, other: I) -> <a class="struct" href="../../rayon/iter/struct.Interleave.html" title="struct rayon::iter::Interleave">Interleave</a><Self, I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a><Item = Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a><Item = Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>, </span></code></h3><div class='docblock'><p>Interleave elements of this iterator and the other given
|
|
|
|
|
iterator. Alternately yields elements from this iterator and
|
|
|
|
|
the given iterator, until both are exhausted. If one iterator
|
|
|
|
|
is exhausted before the other, the last elements are provided
|
|
|
|
|
from the other.</p>
|
|
|
|
|
<h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
<span class="kw">let</span> (<span class="ident">x</span>, <span class="ident">y</span>) <span class="op">=</span> (<span class="macro">vec</span><span class="macro">!</span>[<span class="number">1</span>, <span class="number">2</span>], <span class="macro">vec</span><span class="macro">!</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
|
|
|
|
<span class="kw">let</span> <span class="ident">r</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">i32</span><span class="op">></span> <span class="op">=</span> <span class="ident">x</span>.<span class="ident">into_par_iter</span>().<span class="ident">interleave</span>(<span class="ident">y</span>).<span class="ident">collect</span>();
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">r</span>, <span class="macro">vec</span><span class="macro">!</span>[<span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</pre></div>
|
|
|
|
|
</div><h3 id='method.interleave_shortest' class='method'><code id='interleave_shortest.v'>fn <a href='#method.interleave_shortest' class='fnname'>interleave_shortest</a><I>(self, other: I) -> <a class="struct" href="../../rayon/iter/struct.InterleaveShortest.html" title="struct rayon::iter::InterleaveShortest">InterleaveShortest</a><Self, I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a><Item = Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a><Item = Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>, </span></code></h3><div class='docblock'><p>Interleave elements of this iterator and the other given
|
|
|
|
|
iterator, until one is exhausted.</p>
|
|
|
|
|
<h1 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
<span class="kw">let</span> (<span class="ident">x</span>, <span class="ident">y</span>) <span class="op">=</span> (<span class="macro">vec</span><span class="macro">!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>], <span class="macro">vec</span><span class="macro">!</span>[<span class="number">5</span>, <span class="number">6</span>]);
|
|
|
|
|
<span class="kw">let</span> <span class="ident">r</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">i32</span><span class="op">></span> <span class="op">=</span> <span class="ident">x</span>.<span class="ident">into_par_iter</span>().<span class="ident">interleave_shortest</span>(<span class="ident">y</span>).<span class="ident">collect</span>();
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">r</span>, <span class="macro">vec</span><span class="macro">!</span>[<span class="number">1</span>, <span class="number">5</span>, <span class="number">2</span>, <span class="number">6</span>, <span class="number">3</span>]);</pre></div>
|
|
|
|
|
</div><h3 id='method.chunks' class='method'><code id='chunks.v'>fn <a href='#method.chunks' class='fnname'>chunks</a>(self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../rayon/iter/struct.Chunks.html" title="struct rayon::iter::Chunks">Chunks</a><Self></code></h3><div class='docblock'><p>Split an iterator up into fixed-size chunks.</p>
|
|
|
|
|
<p>Returns an iterator that returns <code>Vec</code>s of the given number of elements.
|
|
|
|
|
If the number of elements in the iterator is not divisible by <code>chunk_size</code>,
|
|
|
|
|
the last chunk may be shorter than <code>chunk_size</code>.</p>
|
|
|
|
|
<p>See also <a href="../slice/trait.ParallelSlice.html#method.par_chunks"><code>par_chunks()</code></a> and <a href="../slice/trait.ParallelSliceMut.html#method.par_chunks_mut"><code>par_chunks_mut()</code></a> for similar behavior on
|
|
|
|
|
slices, without having to allocate intermediate <code>Vec</code>s for the chunks.</p>
|
|
|
|
|
<h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>, <span class="number">8</span>, <span class="number">9</span>, <span class="number">10</span>];
|
|
|
|
|
<span class="kw">let</span> <span class="ident">r</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">i32</span><span class="op">></span><span class="op">></span> <span class="op">=</span> <span class="ident">a</span>.<span class="ident">into_par_iter</span>().<span class="ident">chunks</span>(<span class="number">3</span>).<span class="ident">collect</span>();
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">r</span>, <span class="macro">vec</span><span class="macro">!</span>[<span class="macro">vec</span><span class="macro">!</span>[<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>], <span class="macro">vec</span><span class="macro">!</span>[<span class="number">4</span>,<span class="number">5</span>,<span class="number">6</span>], <span class="macro">vec</span><span class="macro">!</span>[<span class="number">7</span>,<span class="number">8</span>,<span class="number">9</span>], <span class="macro">vec</span><span class="macro">!</span>[<span class="number">10</span>]]);</pre></div>
|
|
|
|
|
</div><h3 id='method.cmp' class='method'><code id='cmp.v'>fn <a href='#method.cmp' class='fnname'>cmp</a><I>(self, other: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a><Item = Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>, </span></code></h3><div class='docblock'><p>Lexicographically compares the elements of this <code>ParallelIterator</code> with those of
|
|
|
|
|
another.</p>
|
|
|
|
|
<h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">x</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">x</span>.<span class="ident">par_iter</span>().<span class="ident">cmp</span>(<span class="kw-2">&</span><span class="macro">vec</span><span class="macro">!</span>[<span class="number">1</span>, <span class="number">3</span>, <span class="number">0</span>]), <span class="ident">Less</span>);
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">x</span>.<span class="ident">par_iter</span>().<span class="ident">cmp</span>(<span class="kw-2">&</span><span class="macro">vec</span><span class="macro">!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]), <span class="ident">Equal</span>);
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">x</span>.<span class="ident">par_iter</span>().<span class="ident">cmp</span>(<span class="kw-2">&</span><span class="macro">vec</span><span class="macro">!</span>[<span class="number">1</span>, <span class="number">2</span>]), <span class="ident">Greater</span>);</pre></div>
|
|
|
|
|
</div><h3 id='method.partial_cmp' class='method'><code id='partial_cmp.v'>fn <a href='#method.partial_cmp' class='fnname'>partial_cmp</a><I>(self, other: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>>, </span></code></h3><div class='docblock'><p>Lexicographically compares the elements of this <code>ParallelIterator</code> with those of
|
|
|
|
|
another.</p>
|
|
|
|
|
<h1 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">cmp</span>::<span class="ident">Ordering</span>::<span class="kw-2">*</span>;
|
|
|
|
|
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">f64</span>::<span class="ident">NAN</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">x</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="number">1.0</span>, <span class="number">2.0</span>, <span class="number">3.0</span>];
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">x</span>.<span class="ident">par_iter</span>().<span class="ident">partial_cmp</span>(<span class="kw-2">&</span><span class="macro">vec</span><span class="macro">!</span>[<span class="number">1.0</span>, <span class="number">3.0</span>, <span class="number">0.0</span>]), <span class="prelude-val">Some</span>(<span class="ident">Less</span>));
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">x</span>.<span class="ident">par_iter</span>().<span class="ident">partial_cmp</span>(<span class="kw-2">&</span><span class="macro">vec</span><span class="macro">!</span>[<span class="number">1.0</span>, <span class="number">2.0</span>, <span class="number">3.0</span>]), <span class="prelude-val">Some</span>(<span class="ident">Equal</span>));
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">x</span>.<span class="ident">par_iter</span>().<span class="ident">partial_cmp</span>(<span class="kw-2">&</span><span class="macro">vec</span><span class="macro">!</span>[<span class="number">1.0</span>, <span class="number">2.0</span>]), <span class="prelude-val">Some</span>(<span class="ident">Greater</span>));
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">x</span>.<span class="ident">par_iter</span>().<span class="ident">partial_cmp</span>(<span class="kw-2">&</span><span class="macro">vec</span><span class="macro">!</span>[<span class="number">1.0</span>, <span class="ident">NAN</span>]), <span class="prelude-val">None</span>);</pre></div>
|
|
|
|
|
</div><h3 id='method.eq' class='method'><code id='eq.v'>fn <a href='#method.eq' class='fnname'>eq</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>>, </span></code></h3><div class='docblock'><p>Determines if the elements of this <code>ParallelIterator</code>
|
|
|
|
|
are equal to those of another</p>
|
|
|
|
|
</div><h3 id='method.ne' class='method'><code id='ne.v'>fn <a href='#method.ne' class='fnname'>ne</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>>, </span></code></h3><div class='docblock'><p>Determines if the elements of this <code>ParallelIterator</code>
|
|
|
|
|
are unequal to those of another</p>
|
|
|
|
|
</div><h3 id='method.lt' class='method'><code id='lt.v'>fn <a href='#method.lt' class='fnname'>lt</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>>, </span></code></h3><div class='docblock'><p>Determines if the elements of this <code>ParallelIterator</code>
|
|
|
|
|
are lexicographically less than those of another.</p>
|
|
|
|
|
</div><h3 id='method.le' class='method'><code id='le.v'>fn <a href='#method.le' class='fnname'>le</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>>, </span></code></h3><div class='docblock'><p>Determines if the elements of this <code>ParallelIterator</code>
|
|
|
|
|
are less or equal to those of another.</p>
|
|
|
|
|
</div><h3 id='method.gt' class='method'><code id='gt.v'>fn <a href='#method.gt' class='fnname'>gt</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>>, </span></code></h3><div class='docblock'><p>Determines if the elements of this <code>ParallelIterator</code>
|
|
|
|
|
are lexicographically greater than those of another.</p>
|
|
|
|
|
</div><h3 id='method.ge' class='method'><code id='ge.v'>fn <a href='#method.ge' class='fnname'>ge</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="../../rayon/iter/trait.IntoParallelIterator.html" title="trait rayon::iter::IntoParallelIterator">IntoParallelIterator</a>,<br> I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Iter" title="type rayon::iter::IntoParallelIterator::Iter">Iter</a>: <a class="trait" href="../../rayon/iter/trait.IndexedParallelIterator.html" title="trait rayon::iter::IndexedParallelIterator">IndexedParallelIterator</a>,<br> Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><I::<a class="type" href="../../rayon/iter/trait.IntoParallelIterator.html#associatedtype.Item" title="type rayon::iter::IntoParallelIterator::Item">Item</a>>, </span></code></h3><div class='docblock'><p>Determines if the elements of this <code>ParallelIterator</code>
|
|
|
|
|
are less or equal to those of another.</p>
|
|
|
|
|
</div><h3 id='method.enumerate' class='method'><code id='enumerate.v'>fn <a href='#method.enumerate' class='fnname'>enumerate</a>(self) -> <a class="struct" href="../../rayon/iter/struct.Enumerate.html" title="struct rayon::iter::Enumerate">Enumerate</a><Self></code></h3><div class='docblock'><p>Yields an index along with each item.</p>
|
|
|
|
|
<h1 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">chars</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>];
|
|
|
|
|
<span class="kw">let</span> <span class="ident">result</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw">_</span><span class="op">></span> <span class="op">=</span> <span class="ident">chars</span>
|
|
|
|
|
.<span class="ident">into_par_iter</span>()
|
|
|
|
|
.<span class="ident">enumerate</span>()
|
|
|
|
|
.<span class="ident">collect</span>();
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">result</span>, [(<span class="number">0</span>, <span class="string">'a'</span>), (<span class="number">1</span>, <span class="string">'b'</span>), (<span class="number">2</span>, <span class="string">'c'</span>)]);</pre></div>
|
|
|
|
|
</div><h3 id='method.skip' class='method'><code id='skip.v'>fn <a href='#method.skip' class='fnname'>skip</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../rayon/iter/struct.Skip.html" title="struct rayon::iter::Skip">Skip</a><Self></code></h3><div class='docblock'><p>Creates an iterator that skips the first <code>n</code> elements.</p>
|
|
|
|
|
<h1 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">result</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw">_</span><span class="op">></span> <span class="op">=</span> (<span class="number">0</span>..<span class="number">100</span>)
|
|
|
|
|
.<span class="ident">into_par_iter</span>()
|
|
|
|
|
.<span class="ident">skip</span>(<span class="number">95</span>)
|
|
|
|
|
.<span class="ident">collect</span>();
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">result</span>, [<span class="number">95</span>, <span class="number">96</span>, <span class="number">97</span>, <span class="number">98</span>, <span class="number">99</span>]);</pre></div>
|
|
|
|
|
</div><h3 id='method.take' class='method'><code id='take.v'>fn <a href='#method.take' class='fnname'>take</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../rayon/iter/struct.Take.html" title="struct rayon::iter::Take">Take</a><Self></code></h3><div class='docblock'><p>Creates an iterator that yields the first <code>n</code> elements.</p>
|
|
|
|
|
<h1 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">result</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw">_</span><span class="op">></span> <span class="op">=</span> (<span class="number">0</span>..<span class="number">100</span>)
|
|
|
|
|
.<span class="ident">into_par_iter</span>()
|
|
|
|
|
.<span class="ident">take</span>(<span class="number">5</span>)
|
|
|
|
|
.<span class="ident">collect</span>();
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">result</span>, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</pre></div>
|
|
|
|
|
</div><h3 id='method.position_any' class='method'><code id='position_any.v'>fn <a href='#method.position_any' class='fnname'>position_any</a><P>(self, predicate: P) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></code></h3><div class='docblock'><p>Searches for <strong>some</strong> item in the parallel iterator that
|
|
|
|
|
matches the given predicate, and returns its index. Like
|
|
|
|
|
<code>ParallelIterator::find_any</code>, the parallel search will not
|
|
|
|
|
necessarily find the <strong>first</strong> match, and once a match is
|
|
|
|
|
found we'll attempt to stop processing any more.</p>
|
|
|
|
|
<h1 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>];
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">i</span> <span class="op">=</span> <span class="ident">a</span>.<span class="ident">par_iter</span>().<span class="ident">position_any</span>(<span class="op">|</span><span class="kw-2">&</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="number">3</span>).<span class="ident">expect</span>(<span class="string">"found"</span>);
|
|
|
|
|
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">i</span> <span class="op">=</span><span class="op">=</span> <span class="number">2</span> <span class="op">|</span><span class="op">|</span> <span class="ident">i</span> <span class="op">=</span><span class="op">=</span> <span class="number">3</span>);
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">a</span>.<span class="ident">par_iter</span>().<span class="ident">position_any</span>(<span class="op">|</span><span class="kw-2">&</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="number">100</span>), <span class="prelude-val">None</span>);</pre></div>
|
|
|
|
|
</div><h3 id='method.position_first' class='method'><code id='position_first.v'>fn <a href='#method.position_first' class='fnname'>position_first</a><P>(self, predicate: P) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></code></h3><div class='docblock'><p>Searches for the sequentially <strong>first</strong> item in the parallel iterator
|
|
|
|
|
that matches the given predicate, and returns its index.</p>
|
|
|
|
|
<p>Like <code>ParallelIterator::find_first</code>, once a match is found,
|
|
|
|
|
all attempts to the right of the match will be stopped, while
|
|
|
|
|
attempts to the left must continue in case an earlier match
|
|
|
|
|
is found.</p>
|
|
|
|
|
<p>Note that not all parallel iterators have a useful order, much like
|
|
|
|
|
sequential <code>HashMap</code> iteration, so "first" may be nebulous. If you
|
|
|
|
|
just want the first match that discovered anywhere in the iterator,
|
|
|
|
|
<code>position_any</code> is a better choice.</p>
|
|
|
|
|
<h1 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>];
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">a</span>.<span class="ident">par_iter</span>().<span class="ident">position_first</span>(<span class="op">|</span><span class="kw-2">&</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="number">3</span>), <span class="prelude-val">Some</span>(<span class="number">2</span>));
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">a</span>.<span class="ident">par_iter</span>().<span class="ident">position_first</span>(<span class="op">|</span><span class="kw-2">&</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="number">100</span>), <span class="prelude-val">None</span>);</pre></div>
|
|
|
|
|
</div><h3 id='method.position_last' class='method'><code id='position_last.v'>fn <a href='#method.position_last' class='fnname'>position_last</a><P>(self, predicate: P) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></code></h3><div class='docblock'><p>Searches for the sequentially <strong>last</strong> item in the parallel iterator
|
|
|
|
|
that matches the given predicate, and returns its index.</p>
|
|
|
|
|
<p>Like <code>ParallelIterator::find_last</code>, once a match is found,
|
|
|
|
|
all attempts to the left of the match will be stopped, while
|
|
|
|
|
attempts to the right must continue in case a later match
|
|
|
|
|
is found.</p>
|
|
|
|
|
<p>Note that not all parallel iterators have a useful order, much like
|
|
|
|
|
sequential <code>HashMap</code> iteration, so "last" may be nebulous. When the
|
|
|
|
|
order doesn't actually matter to you, <code>position_any</code> is a better
|
|
|
|
|
choice.</p>
|
|
|
|
|
<h1 id="examples-14" class="section-header"><a href="#examples-14">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>];
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">a</span>.<span class="ident">par_iter</span>().<span class="ident">position_last</span>(<span class="op">|</span><span class="kw-2">&</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="number">3</span>), <span class="prelude-val">Some</span>(<span class="number">3</span>));
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">a</span>.<span class="ident">par_iter</span>().<span class="ident">position_last</span>(<span class="op">|</span><span class="kw-2">&</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="number">100</span>), <span class="prelude-val">None</span>);</pre></div>
|
|
|
|
|
</div><h3 id='method.rev' class='method'><code id='rev.v'>fn <a href='#method.rev' class='fnname'>rev</a>(self) -> <a class="struct" href="../../rayon/iter/struct.Rev.html" title="struct rayon::iter::Rev">Rev</a><Self></code></h3><div class='docblock'><p>Produces a new iterator with the elements of this iterator in
|
|
|
|
|
reverse order.</p>
|
|
|
|
|
<h1 id="examples-15" class="section-header"><a href="#examples-15">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">result</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw">_</span><span class="op">></span> <span class="op">=</span> (<span class="number">0</span>..<span class="number">5</span>)
|
|
|
|
|
.<span class="ident">into_par_iter</span>()
|
|
|
|
|
.<span class="ident">rev</span>()
|
|
|
|
|
.<span class="ident">collect</span>();
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">result</span>, [<span class="number">4</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">0</span>]);</pre></div>
|
|
|
|
|
</div><h3 id='method.with_min_len' class='method'><code id='with_min_len.v'>fn <a href='#method.with_min_len' class='fnname'>with_min_len</a>(self, min: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../rayon/iter/struct.MinLen.html" title="struct rayon::iter::MinLen">MinLen</a><Self></code></h3><div class='docblock'><p>Sets the minimum length of iterators desired to process in each
|
|
|
|
|
thread. Rayon will not split any smaller than this length, but
|
|
|
|
|
of course an iterator could already be smaller to begin with.</p>
|
|
|
|
|
<p>Producers like <code>zip</code> and <code>interleave</code> will use greater of the two
|
|
|
|
|
minimums.
|
|
|
|
|
Chained iterators and iterators inside <code>flat_map</code> may each use
|
|
|
|
|
their own minimum length.</p>
|
|
|
|
|
<h1 id="examples-16" class="section-header"><a href="#examples-16">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">min</span> <span class="op">=</span> (<span class="number">0</span>..<span class="number">1_000_000</span>)
|
|
|
|
|
.<span class="ident">into_par_iter</span>()
|
|
|
|
|
.<span class="ident">with_min_len</span>(<span class="number">1234</span>)
|
|
|
|
|
.<span class="ident">fold</span>(<span class="op">|</span><span class="op">|</span> <span class="number">0</span>, <span class="op">|</span><span class="ident">acc</span>, <span class="kw">_</span><span class="op">|</span> <span class="ident">acc</span> <span class="op">+</span> <span class="number">1</span>) <span class="comment">// count how many are in this segment</span>
|
|
|
|
|
.<span class="ident">min</span>().<span class="ident">unwrap</span>();
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">min</span> <span class="op">></span><span class="op">=</span> <span class="number">1234</span>);</pre></div>
|
|
|
|
|
</div><h3 id='method.with_max_len' class='method'><code id='with_max_len.v'>fn <a href='#method.with_max_len' class='fnname'>with_max_len</a>(self, max: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../rayon/iter/struct.MaxLen.html" title="struct rayon::iter::MaxLen">MaxLen</a><Self></code></h3><div class='docblock'><p>Sets the maximum length of iterators desired to process in each
|
|
|
|
|
thread. Rayon will try to split at least below this length,
|
|
|
|
|
unless that would put it below the length from <code>with_min_len()</code>.
|
|
|
|
|
For example, given min=10 and max=15, a length of 16 will not be
|
|
|
|
|
split any further.</p>
|
|
|
|
|
<p>Producers like <code>zip</code> and <code>interleave</code> will use lesser of the two
|
|
|
|
|
maximums.
|
|
|
|
|
Chained iterators and iterators inside <code>flat_map</code> may each use
|
|
|
|
|
their own maximum length.</p>
|
|
|
|
|
<h1 id="examples-17" class="section-header"><a href="#examples-17">Examples</a></h1>
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
|
|
<span class="kw">use</span> <span class="ident">rayon</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
|
|
|
|
|
|
|
|
|
<span class="kw">let</span> <span class="ident">max</span> <span class="op">=</span> (<span class="number">0</span>..<span class="number">1_000_000</span>)
|
|
|
|
|
.<span class="ident">into_par_iter</span>()
|
|
|
|
|
.<span class="ident">with_max_len</span>(<span class="number">1234</span>)
|
|
|
|
|
.<span class="ident">fold</span>(<span class="op">|</span><span class="op">|</span> <span class="number">0</span>, <span class="op">|</span><span class="ident">acc</span>, <span class="kw">_</span><span class="op">|</span> <span class="ident">acc</span> <span class="op">+</span> <span class="number">1</span>) <span class="comment">// count how many are in this segment</span>
|
|
|
|
|
.<span class="ident">max</span>().<span class="ident">unwrap</span>();
|
|
|
|
|
|
|
|
|
|
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">max</span> <span class="op"><</span><span class="op">=</span> <span class="number">1234</span>);</pre></div>
|
|
|
|
|
</div></div><span class='loading-content'>Loading content...</span>
|
|
|
|
|
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-IndexedParallelIterator' class='impl'><code class='in-band'>impl IndexedParallelIterator for rayon::range::<a class="struct" href="../../rayon/range/struct.Iter.html" title="struct rayon::range::Iter">Iter</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>></code><a href='#impl-IndexedParallelIterator' class='anchor'></a><a class='srclink' href='../../src/rayon/range.rs.html#95-113' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.drive' class="method hidden"><code id='drive.v-1'>fn <a href='#method.drive' class='fnname'>drive</a><C>(self, consumer: C) -> C::<a class="type" href="../../rayon/iter/plumbing/trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a> <span class="where fmt-newline">where<br> C: <a class="trait" href="../../rayon/iter/plumbing/trait.Consumer.html" title="trait rayon::iter::plumbing::Consumer">Consumer</a><Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>, </span></code><a class='srclink' href='../../src/rayon/range.rs.html#96-101' title='goto source code'>[src]</a></h4><h4 id='method.len' class="method hidden"><code id='len.v-1'>fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/rayon/range.rs.html#103-105' title='goto source code'>[src]</a></h4><h4 id='method.with_producer' class="method hidden"><code id='with_producer.v-1'>fn <a href='#method.with_producer' class='fnname'>with_producer</a><CB>(self, callback: CB) -> CB::<a class="type" href="../../rayon/iter/plumbing/trait.ProducerCallback.html#associatedtype.Output" title="type rayon::iter::plumbing::ProducerCallback::Output">Output</a> <span class="where fmt-newline">where<br> CB: <a class="trait" href="../../rayon/iter/plumbing/trait.ProducerCallback.html" title="trait rayon::iter::plumbing::ProducerCallback">ProducerCallback</a><Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>, </span></code><a class='srclink' href='../../src/rayon/range.rs.html#107-112' title='goto source code'>[src]</a></h4></div><h3 id='impl-IndexedParallelIterator-1' class='impl'><code class='in-band'>impl IndexedParallelIterator for rayon::range::<a class="struct" href="../../rayon/range/struct.Iter.html" title="struct rayon::range::Iter">Iter</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></code><a href='#impl-IndexedParallelIterator-1' class='anchor'></a><a class='srclink' href='../../src/rayon/range.rs.html#95-113' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.drive-1' class="method hidden"><code id='drive.v-2'>fn <a href='#method.drive-1' class='fnname'>drive</a><C>(self, consumer: C) -> C::<a class="type" href="../../rayon/iter/plumbing/trait.Consumer.html#associatedtype.Result" title="type rayon::iter::plumbing::Consumer::Result">Result</a> <span class="where fmt-newline">where<br> C: <a class="trait" href="../../rayon/iter/plumbing/trait.Consumer.html" title="trait rayon::iter::plumbing::Consumer">Consumer</a><Self::<a class="type" href="../../rayon/iter/trait.ParallelIterator.html#associatedtype.Item" title="type rayon::iter::ParallelIterator::Item">Item</a>>, </span></code><a class='srclink' href='../../src/rayon/range.rs.html#96-101' title='goto source code'>[src]</a></h4><h4 id='method.len-1' class="method hidden"><code id='len.v-2'>fn <a href='#method.len-1' class='fnname'>len</a>(&
|
|
|
|
|
src="../../implementors/rayon/iter/trait.IndexedParallelIterator.js">
|
|
|
|
|
</script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "rayon";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|