blob: 209df72a30e689234649568b681b753be48f23d6 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The concrete iterator types."><meta name="keywords" content="rust, rustlang, rust-lang, structs"><title>itertools::structs - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../itertools/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../itertools/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module structs</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#types">Type Definitions</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../index.html">itertools</a>::<wbr><a class="mod" href="#">structs</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/itertools/lib.rs.html#79">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The concrete iterator types.</p>
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Batching.html" title="itertools::structs::Batching struct">Batching</a></div><div class="item-right docblock-short">A “meta iterator adaptor”. Its closure receives a reference to the iterator
and may pick off as many elements as it likes, to produce the next iterator element.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Coalesce.html" title="itertools::structs::Coalesce struct">Coalesce</a></div><div class="item-right docblock-short">An iterator adaptor that may join together adjacent elements.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ConsTuples.html" title="itertools::structs::ConsTuples struct">ConsTuples</a></div><div class="item-right docblock-short">An iterator that maps an iterator of tuples like
<code>((A, B), C)</code> to an iterator of <code>(A, B, C)</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DedupBy.html" title="itertools::structs::DedupBy struct">DedupBy</a></div><div class="item-right docblock-short">An iterator adaptor that removes repeated duplicates, determining equality using a comparison function.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ExactlyOneError.html" title="itertools::structs::ExactlyOneError struct">ExactlyOneError</a></div><div class="item-right docblock-short">Iterator returned for the error case of <code>IterTools::exactly_one()</code>
This iterator yields exactly the same elements as the input iterator.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Format.html" title="itertools::structs::Format struct">Format</a></div><div class="item-right docblock-short">Format all iterator elements lazily, separated by <code>sep</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.FormatWith.html" title="itertools::structs::FormatWith struct">FormatWith</a></div><div class="item-right docblock-short">Format all iterator elements lazily, separated by <code>sep</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Interleave.html" title="itertools::structs::Interleave struct">Interleave</a></div><div class="item-right docblock-short">An iterator adaptor that alternates elements from two iterators until both
run out.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.InterleaveShortest.html" title="itertools::structs::InterleaveShortest struct">InterleaveShortest</a></div><div class="item-right docblock-short">An iterator adaptor that alternates elements from the two iterators until
one of them runs out.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Intersperse.html" title="itertools::structs::Intersperse struct">Intersperse</a></div><div class="item-right docblock-short">An iterator adaptor to insert a particular value
between each element of the adapted iterator.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Iterate.html" title="itertools::structs::Iterate struct">Iterate</a></div><div class="item-right docblock-short">An iterator that infinitely applies function to value and yields results.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.MapInto.html" title="itertools::structs::MapInto struct">MapInto</a></div><div class="item-right docblock-short">An iterator adapter to apply <code>Into</code> conversion to each element.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.MapResults.html" title="itertools::structs::MapResults struct">MapResults</a></div><div class="item-right docblock-short">An iterator adapter to apply a transformation within a nested <code>Result</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.MergeBy.html" title="itertools::structs::MergeBy struct">MergeBy</a></div><div class="item-right docblock-short">An iterator adaptor that merges the two base iterators in ascending order.
If both base iterators are sorted (ascending), the result is sorted.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.MergeJoinBy.html" title="itertools::structs::MergeJoinBy struct">MergeJoinBy</a></div><div class="item-right docblock-short">An iterator adaptor that merge-joins items from the two base iterators in ascending order.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.PadUsing.html" title="itertools::structs::PadUsing struct">PadUsing</a></div><div class="item-right docblock-short">An iterator adaptor that pads a sequence to a minimum length by filling
missing elements using a closure.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.PeekingTakeWhile.html" title="itertools::structs::PeekingTakeWhile struct">PeekingTakeWhile</a></div><div class="item-right docblock-short">An iterator adaptor that takes items while a closure returns <code>true</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Positions.html" title="itertools::structs::Positions struct">Positions</a></div><div class="item-right docblock-short">An iterator adapter to get the positions of each element that matches a predicate.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ProcessResults.html" title="itertools::structs::ProcessResults struct">ProcessResults</a></div><div class="item-right docblock-short">An iterator that produces only the <code>T</code> values as long as the
inner iterator produces <code>Ok(T)</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Product.html" title="itertools::structs::Product struct">Product</a></div><div class="item-right docblock-short">An iterator adaptor that iterates over the cartesian product of
the element sets of two iterators <code>I</code> and <code>J</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.PutBack.html" title="itertools::structs::PutBack struct">PutBack</a></div><div class="item-right docblock-short">An iterator adaptor that allows putting back a single
item to the front of the iterator.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.RepeatCall.html" title="itertools::structs::RepeatCall struct">RepeatCall</a><span class="stab deprecated" title="">Deprecated</span></div><div class="item-right docblock-short">See <a href="../fn.repeat_call.html"><code>repeat_call</code></a> for more information.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.RepeatN.html" title="itertools::structs::RepeatN struct">RepeatN</a></div><div class="item-right docblock-short">An iterator that produces <em>n</em> repetitions of an element.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Step.html" title="itertools::structs::Step struct">Step</a><span class="stab deprecated" title="">Deprecated</span></div><div class="item-right docblock-short">An iterator adaptor that steps a number elements in the base iterator
for each iteration.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TakeWhileRef.html" title="itertools::structs::TakeWhileRef struct">TakeWhileRef</a></div><div class="item-right docblock-short">An iterator adaptor that borrows from a <code>Clone</code>-able iterator
to only pick off elements while the predicate returns <code>true</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TupleBuffer.html" title="itertools::structs::TupleBuffer struct">TupleBuffer</a></div><div class="item-right docblock-short">An iterator over a incomplete tuple.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TupleCombinations.html" title="itertools::structs::TupleCombinations struct">TupleCombinations</a></div><div class="item-right docblock-short">An iterator to iterate through all combinations in a <code>Clone</code>-able iterator that produces tuples
of a specific size.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TupleWindows.html" title="itertools::structs::TupleWindows struct">TupleWindows</a></div><div class="item-right docblock-short">An iterator over all contiguous windows that produces tuples of a specific size.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Tuples.html" title="itertools::structs::Tuples struct">Tuples</a></div><div class="item-right docblock-short">An iterator that groups the items in tuples of a specific size.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Unfold.html" title="itertools::structs::Unfold struct">Unfold</a></div><div class="item-right docblock-short">See <a href="../fn.unfold.html"><code>unfold</code></a> for more information.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Update.html" title="itertools::structs::Update struct">Update</a></div><div class="item-right docblock-short">An iterator adapter to apply a mutating function to each element before yielding it.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.WhileSome.html" title="itertools::structs::WhileSome struct">WhileSome</a></div><div class="item-right docblock-short">An iterator adaptor that filters <code>Option&lt;A&gt;</code> iterator elements
and produces <code>A</code>. Stops on the first <code>None</code> encountered.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.WithPosition.html" title="itertools::structs::WithPosition struct">WithPosition</a></div><div class="item-right docblock-short">An iterator adaptor that wraps each element in an <a href="../enum.Position.html"><code>Position</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Zip.html" title="itertools::structs::Zip struct">Zip</a></div><div class="item-right docblock-short">See <a href="../fn.multizip.html"><code>multizip</code></a> for more information.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZipEq.html" title="itertools::structs::ZipEq struct">ZipEq</a></div><div class="item-right docblock-short">An iterator which iterates two other iterators simultaneously</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZipLongest.html" title="itertools::structs::ZipLongest struct">ZipLongest</a></div><div class="item-right docblock-short">An iterator which iterates two other iterators simultaneously</div></div></div><h2 id="types" class="small-section-header"><a href="#types">Type Definitions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="type" href="type.Dedup.html" title="itertools::structs::Dedup type">Dedup</a></div><div class="item-right docblock-short">An iterator adaptor that removes repeated duplicates.</div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.Merge.html" title="itertools::structs::Merge type">Merge</a></div><div class="item-right docblock-short">An iterator adaptor that merges the two base iterators in ascending order.
If both base iterators are sorted (ascending), the result is sorted.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="itertools" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>