Files
tantivy/master/itertools/structs/index.html
2019-06-16 03:00:46 +00:00

74 lines
18 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="../../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 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">&#9776;</div><a href='../../itertools/index.html'><img src='../../rust-logo.png' alt='logo' width='100'></a><p class='location'>Module structs</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class='location'><a href='../index.html'>itertools</a></p><script>window.sidebarCurrent = {name: 'structs', ty: 'mod', 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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/itertools/lib.rs.html#79-133' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>itertools</a>::<wbr><a class="mod" href=''>structs</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.Coalesce.html" title='itertools::structs::Coalesce struct'>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="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>n</code>-length combinations in an iterator.</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.Dedup.html" title='itertools::structs::Dedup struct'>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="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.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.Intersperse.html" title='itertools::structs::Intersperse struct'>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="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.KMerge.html" title='itertools::structs::KMerge struct'>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="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.MapInto.html" title='itertools::structs::MapInto struct'>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="struct" href="struct.MapResults.html" title='itertools::structs::MapResults struct'>MapResults</a></td><td class='docblock-short'><p>An iterator adapter to apply a transformation within a nested <code>Result</code>.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.Merge.html" title='itertools::structs::Merge struct'>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><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.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.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.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&lt;RefCell&lt;I&gt;&gt;</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">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">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&lt;A&gt;</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></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>&#9166;</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 = "itertools";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>