mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-26 19:58:50 +01:00
103 lines
22 KiB
HTML
103 lines
22 KiB
HTML
<!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 `structs` mod in crate `itertools`."><meta name="keywords" content="rust, rustlang, rust-lang, structs"><title>itertools::structs - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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='../../itertools/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module structs</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class="location"><a href="../index.html">itertools</a></p><div id="sidebar-vars" data-name="structs" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||
<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="in-band">Module <a href="../index.html">itertools</a>::<wbr><a class="mod" href="">structs</a></span><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/itertools/lib.rs.html#86-156" title="goto source code">[src]</a></span></h1><div class="docblock"><p>The concrete iterator types.</p>
|
||
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||
<table><tr class="module-item"><td><a class="struct" href="struct.Batching.html" title="itertools::structs::Batching struct">Batching</a></td><td class="docblock-short"><p>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.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Chunk.html" title="itertools::structs::Chunk struct">Chunk</a></td><td class="docblock-short"><p>An iterator for the elements in a single chunk.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Chunks.html" title="itertools::structs::Chunks struct">Chunks</a></td><td class="docblock-short"><p>An iterator that yields the Chunk iterators.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.CircularTupleWindows.html" title="itertools::structs::CircularTupleWindows struct">CircularTupleWindows</a></td><td class="docblock-short"><p>An iterator over all windows,wrapping back to the first elements when the
|
||
window would otherwise exceed the length of the iterator, producing tuples
|
||
of a specific size.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Combinations.html" title="itertools::structs::Combinations struct">Combinations</a></td><td class="docblock-short"><p>An iterator to iterate through all the <code>k</code>-length combinations in an iterator.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.CombinationsWithReplacement.html" title="itertools::structs::CombinationsWithReplacement struct">CombinationsWithReplacement</a></td><td class="docblock-short"><p>An iterator to iterate through all the <code>n</code>-length combinations in an iterator, with replacement.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.ConsTuples.html" title="itertools::structs::ConsTuples struct">ConsTuples</a></td><td class="docblock-short"><p>An iterator that maps an iterator of tuples like
|
||
<code>((A, B), C)</code> to an iterator of <code>(A, B, C)</code>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.ExactlyOneError.html" title="itertools::structs::ExactlyOneError struct">ExactlyOneError</a></td><td class="docblock-short"><p>Iterator returned for the error case of <code>IterTools::exactly_one()</code>
|
||
This iterator yields exactly the same elements as the input iterator.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.FilterMapOk.html" title="itertools::structs::FilterMapOk struct">FilterMapOk</a></td><td class="docblock-short"><p>An iterator adapter to filter and apply a transformation on values within a nested <code>Result::Ok</code>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.FilterOk.html" title="itertools::structs::FilterOk struct">FilterOk</a></td><td class="docblock-short"><p>An iterator adapter to filter values within a nested <code>Result::Ok</code>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Format.html" title="itertools::structs::Format struct">Format</a></td><td class="docblock-short"><p>Format all iterator elements lazily, separated by <code>sep</code>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.FormatWith.html" title="itertools::structs::FormatWith struct">FormatWith</a></td><td class="docblock-short"><p>Format all iterator elements lazily, separated by <code>sep</code>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Group.html" title="itertools::structs::Group struct">Group</a></td><td class="docblock-short"><p>An iterator for the elements in a single group.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.GroupBy.html" title="itertools::structs::GroupBy struct">GroupBy</a></td><td class="docblock-short"><p><code>GroupBy</code> is the storage for the lazy grouping operation.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.GroupingMap.html" title="itertools::structs::GroupingMap struct">GroupingMap</a></td><td class="docblock-short"><p><code>GroupingMap</code> is an intermediate struct for efficient group-and-fold operations.
|
||
It groups elements by their key and at the same time fold each group
|
||
using some aggregating operation.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Groups.html" title="itertools::structs::Groups struct">Groups</a></td><td class="docblock-short"><p>An iterator that yields the Group iterators.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Interleave.html" title="itertools::structs::Interleave struct">Interleave</a></td><td class="docblock-short"><p>An iterator adaptor that alternates elements from two iterators until both
|
||
run out.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.InterleaveShortest.html" title="itertools::structs::InterleaveShortest struct">InterleaveShortest</a></td><td class="docblock-short"><p>An iterator adaptor that alternates elements from the two iterators until
|
||
one of them runs out.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.IntersperseWith.html" title="itertools::structs::IntersperseWith struct">IntersperseWith</a></td><td class="docblock-short"><p>An iterator adaptor to insert a particular value created by a function
|
||
between each element of the adapted iterator.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.IntoChunks.html" title="itertools::structs::IntoChunks struct">IntoChunks</a></td><td class="docblock-short"><p><code>ChunkLazy</code> is the storage for a lazy chunking operation.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Iterate.html" title="itertools::structs::Iterate struct">Iterate</a></td><td class="docblock-short"><p>An iterator that infinitely applies function to value and yields results.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.KMergeBy.html" title="itertools::structs::KMergeBy struct">KMergeBy</a></td><td class="docblock-short"><p>An iterator adaptor that merges an abitrary number of base iterators
|
||
according to an ordering function.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.MergeBy.html" title="itertools::structs::MergeBy struct">MergeBy</a></td><td class="docblock-short"><p>An iterator adaptor that merges the two base iterators in ascending order.
|
||
If both base iterators are sorted (ascending), the result is sorted.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.MergeJoinBy.html" title="itertools::structs::MergeJoinBy struct">MergeJoinBy</a></td><td class="docblock-short"><p>An iterator adaptor that merge-joins items from the two base iterators in ascending order.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.MultiPeek.html" title="itertools::structs::MultiPeek struct">MultiPeek</a></td><td class="docblock-short"><p>See <a href="../fn.multipeek.html"><code>multipeek()</code></a> for more information.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.MultiProduct.html" title="itertools::structs::MultiProduct struct">MultiProduct</a></td><td class="docblock-short"><p>An iterator adaptor that iterates over the cartesian product of
|
||
multiple iterators of type <code>I</code>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.PadUsing.html" title="itertools::structs::PadUsing struct">PadUsing</a></td><td class="docblock-short"><p>An iterator adaptor that pads a sequence to a minimum length by filling
|
||
missing elements using a closure.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.PeekNth.html" title="itertools::structs::PeekNth struct">PeekNth</a></td><td class="docblock-short"><p>See <a href="../fn.peek_nth.html"><code>peek_nth()</code></a> for more information.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.PeekingTakeWhile.html" title="itertools::structs::PeekingTakeWhile struct">PeekingTakeWhile</a></td><td class="docblock-short"><p>An iterator adaptor that takes items while a closure returns <code>true</code>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Permutations.html" title="itertools::structs::Permutations struct">Permutations</a></td><td class="docblock-short"><p>An iterator adaptor that iterates through all the <code>k</code>-permutations of the
|
||
elements from an iterator.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Positions.html" title="itertools::structs::Positions struct">Positions</a></td><td class="docblock-short"><p>An iterator adapter to get the positions of each element that matches a predicate.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Powerset.html" title="itertools::structs::Powerset struct">Powerset</a></td><td class="docblock-short"><p>An iterator to iterate through the powerset of the elements from an iterator.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.ProcessResults.html" title="itertools::structs::ProcessResults struct">ProcessResults</a></td><td class="docblock-short"><p>An iterator that produces only the <code>T</code> values as long as the
|
||
inner iterator produces <code>Ok(T)</code>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Product.html" title="itertools::structs::Product struct">Product</a></td><td class="docblock-short"><p>An iterator adaptor that iterates over the cartesian product of
|
||
the element sets of two iterators <code>I</code> and <code>J</code>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.PutBack.html" title="itertools::structs::PutBack struct">PutBack</a></td><td class="docblock-short"><p>An iterator adaptor that allows putting back a single
|
||
item to the front of the iterator.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.PutBackN.html" title="itertools::structs::PutBackN struct">PutBackN</a></td><td class="docblock-short"><p>An iterator adaptor that allows putting multiple
|
||
items in front of the iterator.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.RcIter.html" title="itertools::structs::RcIter struct">RcIter</a></td><td class="docblock-short"><p>A wrapper for <code>Rc<RefCell<I>></code>, that implements the <code>Iterator</code> trait.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.RepeatCall.html" title="itertools::structs::RepeatCall struct">RepeatCall</a></td><td class="docblock-short"><span class="stab deprecated" title="">Deprecated</span><p>See <a href="../fn.repeat_call.html"><code>repeat_call</code></a> for more information.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.RepeatN.html" title="itertools::structs::RepeatN struct">RepeatN</a></td><td class="docblock-short"><p>An iterator that produces <em>n</em> repetitions of an element.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Step.html" title="itertools::structs::Step struct">Step</a></td><td class="docblock-short"><span class="stab deprecated" title="">Deprecated</span><p>An iterator adaptor that steps a number elements in the base iterator
|
||
for each iteration.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.TakeWhileRef.html" title="itertools::structs::TakeWhileRef struct">TakeWhileRef</a></td><td class="docblock-short"><p>An iterator adaptor that borrows from a <code>Clone</code>-able iterator
|
||
to only pick off elements while the predicate returns <code>true</code>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Tee.html" title="itertools::structs::Tee struct">Tee</a></td><td class="docblock-short"><p>One half of an iterator pair where both return the same elements.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.TupleBuffer.html" title="itertools::structs::TupleBuffer struct">TupleBuffer</a></td><td class="docblock-short"><p>An iterator over a incomplete tuple.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.TupleCombinations.html" title="itertools::structs::TupleCombinations struct">TupleCombinations</a></td><td class="docblock-short"><p>An iterator to iterate through all combinations in a <code>Clone</code>-able iterator that produces tuples
|
||
of a specific size.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.TupleWindows.html" title="itertools::structs::TupleWindows struct">TupleWindows</a></td><td class="docblock-short"><p>An iterator over all contiguous windows that produces tuples of a specific size.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Tuples.html" title="itertools::structs::Tuples struct">Tuples</a></td><td class="docblock-short"><p>An iterator that groups the items in tuples of a specific size.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Unfold.html" title="itertools::structs::Unfold struct">Unfold</a></td><td class="docblock-short"><p>See <a href="../fn.unfold.html"><code>unfold</code></a> for more information.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Unique.html" title="itertools::structs::Unique struct">Unique</a></td><td class="docblock-short"><p>An iterator adapter to filter out duplicate elements.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.UniqueBy.html" title="itertools::structs::UniqueBy struct">UniqueBy</a></td><td class="docblock-short"><p>An iterator adapter to filter out duplicate elements.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Update.html" title="itertools::structs::Update struct">Update</a></td><td class="docblock-short"><p>An iterator adapter to apply a mutating function to each element before yielding it.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.WhileSome.html" title="itertools::structs::WhileSome struct">WhileSome</a></td><td class="docblock-short"><p>An iterator adaptor that filters <code>Option<A></code> iterator elements
|
||
and produces <code>A</code>. Stops on the first <code>None</code> encountered.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.WithPosition.html" title="itertools::structs::WithPosition struct">WithPosition</a></td><td class="docblock-short"><p>An iterator adaptor that wraps each element in an <a href="../enum.Position.html"><code>Position</code></a>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Zip.html" title="itertools::structs::Zip struct">Zip</a></td><td class="docblock-short"><p>See <a href="../fn.multizip.html"><code>multizip</code></a> for more information.</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.ZipEq.html" title="itertools::structs::ZipEq struct">ZipEq</a></td><td class="docblock-short"><p>An iterator which iterates two other iterators simultaneously</p>
|
||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.ZipLongest.html" title="itertools::structs::ZipLongest struct">ZipLongest</a></td><td class="docblock-short"><p>An iterator which iterates two other iterators simultaneously</p>
|
||
</td></tr></table><h2 id="types" class="section-header"><a href="#types">Type Definitions</a></h2>
|
||
<table><tr class="module-item"><td><a class="type" href="type.Coalesce.html" title="itertools::structs::Coalesce type">Coalesce</a></td><td class="docblock-short"><p>An iterator adaptor that may join together adjacent elements.</p>
|
||
</td></tr><tr class="module-item"><td><a class="type" href="type.Dedup.html" title="itertools::structs::Dedup type">Dedup</a></td><td class="docblock-short"><p>An iterator adaptor that removes repeated duplicates.</p>
|
||
</td></tr><tr class="module-item"><td><a class="type" href="type.DedupBy.html" title="itertools::structs::DedupBy type">DedupBy</a></td><td class="docblock-short"><p>An iterator adaptor that removes repeated duplicates, determining equality using a comparison function.</p>
|
||
</td></tr><tr class="module-item"><td><a class="type" href="type.DedupByWithCount.html" title="itertools::structs::DedupByWithCount type">DedupByWithCount</a></td><td class="docblock-short"><p>An iterator adaptor that removes repeated duplicates, while keeping a count of how many
|
||
repeated elements were present. This will determine equality using a comparison function.</p>
|
||
</td></tr><tr class="module-item"><td><a class="type" href="type.DedupWithCount.html" title="itertools::structs::DedupWithCount type">DedupWithCount</a></td><td class="docblock-short"><p>An iterator adaptor that removes repeated duplicates, while keeping a count of how many
|
||
repeated elements were present.</p>
|
||
</td></tr><tr class="module-item"><td><a class="type" href="type.GroupingMapBy.html" title="itertools::structs::GroupingMapBy type">GroupingMapBy</a></td><td class="docblock-short"><p><code>GroupingMapBy</code> is an intermediate struct for efficient group-and-fold operations.</p>
|
||
</td></tr><tr class="module-item"><td><a class="type" href="type.Intersperse.html" title="itertools::structs::Intersperse type">Intersperse</a></td><td class="docblock-short"><p>An iterator adaptor to insert a particular value
|
||
between each element of the adapted iterator.</p>
|
||
</td></tr><tr class="module-item"><td><a class="type" href="type.KMerge.html" title="itertools::structs::KMerge type">KMerge</a></td><td class="docblock-short"><p>An iterator adaptor that merges an abitrary number of base iterators in ascending order.
|
||
If all base iterators are sorted (ascending), the result is sorted.</p>
|
||
</td></tr><tr class="module-item"><td><a class="type" href="type.MapInto.html" title="itertools::structs::MapInto type">MapInto</a></td><td class="docblock-short"><p>An iterator adapter to apply <code>Into</code> conversion to each element.</p>
|
||
</td></tr><tr class="module-item"><td><a class="type" href="type.MapOk.html" title="itertools::structs::MapOk type">MapOk</a></td><td class="docblock-short"><p>An iterator adapter to apply a transformation within a nested <code>Result::Ok</code>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="type" href="type.MapResults.html" title="itertools::structs::MapResults type">MapResults</a></td><td class="docblock-short"><span class="stab deprecated" title="">Deprecated</span><p>See <a href="struct.MapOk.html"><code>MapOk</code></a>.</p>
|
||
</td></tr><tr class="module-item"><td><a class="type" href="type.Merge.html" title="itertools::structs::Merge type">Merge</a></td><td class="docblock-short"><p>An iterator adaptor that merges the two base iterators in ascending order.
|
||
If both base iterators are sorted (ascending), the result is sorted.</p>
|
||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="itertools"></div>
|
||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> |