esp-idf-hal/type.impl/heapless/struct.IndexSet.js

9 lines
41 KiB
JavaScript
Raw Permalink 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.

(function() {
var type_impls = Object.fromEntries([["heapless",[["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Clone-for-IndexSet%3CT,+S,+N%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#486-496\">Source</a><a href=\"#impl-Clone-for-IndexSet%3CT,+S,+N%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T, S, const N: usize&gt; Clone for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S, N&gt;<div class=\"where\">where\n T: Clone,\n S: Clone,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.clone\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#491-495\">Source</a><a href=\"#method.clone\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">clone</a>(&amp;self) -&gt; Self</h4></section></summary><div class='docblock'>Returns a copy of the value. <a>Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.clone_from\" class=\"method trait-impl\"><span class=\"since rightside\" title=\"Stable since Rust version 1.0.0\">1.0.0</span><a href=\"#method.clone_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">clone_from</a>(&amp;mut self, source: &amp;Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a>Read more</a></div></details></div></details>","Clone","heapless::indexset::FnvIndexSet"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Debug-for-IndexSet%3CT,+S,+N%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#498-505\">Source</a><a href=\"#impl-Debug-for-IndexSet%3CT,+S,+N%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T, S, const N: usize&gt; Debug for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S, N&gt;<div class=\"where\">where\n T: Debug,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.fmt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#502-504\">Source</a><a href=\"#method.fmt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">fmt</a>(&amp;self, f: &amp;mut Formatter&lt;'_&gt;) -&gt; Result</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a>Read more</a></div></details></div></details>","Debug","heapless::indexset::FnvIndexSet"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Default-for-IndexSet%3CT,+S,+N%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#507-516\">Source</a><a href=\"#impl-Default-for-IndexSet%3CT,+S,+N%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T, S, const N: usize&gt; Default for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S, N&gt;<div class=\"where\">where\n S: Default,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.default\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#511-515\">Source</a><a href=\"#method.default\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">default</a>() -&gt; Self</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a>Read more</a></div></details></div></details>","Default","heapless::indexset::FnvIndexSet"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Extend%3C%26T%3E-for-IndexSet%3CT,+S,+N%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#543-554\">Source</a><a href=\"#impl-Extend%3C%26T%3E-for-IndexSet%3CT,+S,+N%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;'a, T, S, const N: usize&gt; Extend&lt;&amp;'a T&gt; for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S, N&gt;<div class=\"where\">where\n T: 'a + Eq + Hash + Copy,\n S: BuildHasher,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.extend\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#548-553\">Source</a><a href=\"#method.extend\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">extend</a>&lt;I&gt;(&amp;mut self, iterable: I)<div class=\"where\">where\n I: IntoIterator&lt;Item = &amp;'a T&gt;,</div></h4></section></summary><div class='docblock'>Extends a collection with the contents of an iterator. <a>Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.extend_one\" class=\"method trait-impl\"><a href=\"#method.extend_one\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">extend_one</a>(&amp;mut self, item: A)</h4></section></summary><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Extends a collection with exactly one element.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.extend_reserve\" class=\"method trait-impl\"><a href=\"#method.extend_reserve\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">extend_reserve</a>(&amp;mut self, additional: usize)</h4></section></summary><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Reserves capacity in a collection for the given number of additional elements. <a>Read more</a></div></details></div></details>","Extend<&'a T>","heapless::indexset::FnvIndexSet"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Extend%3CT%3E-for-IndexSet%3CT,+S,+N%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#530-541\">Source</a><a href=\"#impl-Extend%3CT%3E-for-IndexSet%3CT,+S,+N%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T, S, const N: usize&gt; Extend&lt;T&gt; for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S, N&gt;<div class=\"where\">where\n T: Eq + Hash,\n S: BuildHasher,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.extend\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#535-540\">Source</a><a href=\"#method.extend\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">extend</a>&lt;I&gt;(&amp;mut self, iterable: I)<div class=\"where\">where\n I: IntoIterator&lt;Item = T&gt;,</div></h4></section></summary><div class='docblock'>Extends a collection with the contents of an iterator. <a>Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.extend_one\" class=\"method trait-impl\"><a href=\"#method.extend_one\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">extend_one</a>(&amp;mut self, item: A)</h4></section></summary><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Extends a collection with exactly one element.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.extend_reserve\" class=\"method trait-impl\"><a href=\"#method.extend_reserve\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">extend_reserve</a>(&amp;mut self, additional: usize)</h4></section></summary><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Reserves capacity in a collection for the given number of additional elements. <a>Read more</a></div></details></div></details>","Extend<T>","heapless::indexset::FnvIndexSet"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromIterator%3CT%3E-for-IndexSet%3CT,+S,+N%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#556-569\">Source</a><a href=\"#impl-FromIterator%3CT%3E-for-IndexSet%3CT,+S,+N%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T, S, const N: usize&gt; FromIterator&lt;T&gt; for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S, N&gt;<div class=\"where\">where\n T: Eq + Hash,\n S: BuildHasher + Default,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_iter\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#561-568\">Source</a><a href=\"#method.from_iter\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">from_iter</a>&lt;I&gt;(iter: I) -&gt; Self<div class=\"where\">where\n I: IntoIterator&lt;Item = T&gt;,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a>Read more</a></div></details></div></details>","FromIterator<T>","heapless::indexset::FnvIndexSet"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-IndexSet%3CT,+BuildHasherDefault%3CS%3E,+N%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#86-93\">Source</a><a href=\"#impl-IndexSet%3CT,+BuildHasherDefault%3CS%3E,+N%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T, S, const N: usize&gt; <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, <a class=\"struct\" href=\"hash32/struct.BuildHasherDefault.html\" title=\"struct hash32::BuildHasherDefault\">BuildHasherDefault</a>&lt;S&gt;, N&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.new\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#88-92\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"heapless/struct.IndexSet.html#tymethod.new\" class=\"fn\">new</a>() -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Creates an empty <code>IndexSet</code></p>\n</div></details></div></details>",0,"heapless::indexset::FnvIndexSet"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-IndexSet%3CT,+S,+N%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#195-484\">Source</a><a href=\"#impl-IndexSet%3CT,+S,+N%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T, S, const N: usize&gt; <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S, N&gt;<div class=\"where\">where\n T: Eq + Hash,\n S: BuildHasher,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.difference\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#224-235\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.difference\" class=\"fn\">difference</a>&lt;'a, S2, const N2: usize&gt;(\n &amp;'a self,\n other: &amp;'a <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S2, N2&gt;,\n) -&gt; Difference&lt;'a, T, S2, N2&gt;<div class=\"where\">where\n S2: BuildHasher,</div></h4></section></summary><div class=\"docblock\"><p>Visits the values representing the difference, i.e. the values that are in <code>self</code> but not in\n<code>other</code>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>a: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">1</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>].iter().cloned().collect();\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>b: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">4</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>, <span class=\"number\">4</span>].iter().cloned().collect();\n\n<span class=\"comment\">// Can be seen as `a - b`.\n</span><span class=\"kw\">for </span>x <span class=\"kw\">in </span>a.difference(<span class=\"kw-2\">&amp;</span>b) {\n <span class=\"macro\">println!</span>(<span class=\"string\">\"{}\"</span>, x); <span class=\"comment\">// Print 1\n</span>}\n\n<span class=\"kw\">let </span>diff: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = a.difference(<span class=\"kw-2\">&amp;</span>b).collect();\n<span class=\"macro\">assert_eq!</span>(diff, [<span class=\"number\">1</span>].iter().collect::&lt;FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt;&gt;());\n\n<span class=\"comment\">// Note that difference is not symmetric,\n// and `b - a` means something else:\n</span><span class=\"kw\">let </span>diff: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = b.difference(<span class=\"kw-2\">&amp;</span>a).collect();\n<span class=\"macro\">assert_eq!</span>(diff, [<span class=\"number\">4</span>].iter().collect::&lt;FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt;&gt;());</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.symmetric_difference\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#259-267\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.symmetric_difference\" class=\"fn\">symmetric_difference</a>&lt;'a, S2, const N2: usize&gt;(\n &amp;'a self,\n other: &amp;'a <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S2, N2&gt;,\n) -&gt; impl Iterator&lt;Item = &amp;'a T&gt;<div class=\"where\">where\n S2: BuildHasher,</div></h4></section></summary><div class=\"docblock\"><p>Visits the values representing the symmetric difference, i.e. the values that are in <code>self</code>\nor in <code>other</code> but not in both.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>a: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">1</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>].iter().cloned().collect();\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>b: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">4</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>, <span class=\"number\">4</span>].iter().cloned().collect();\n\n<span class=\"comment\">// Print 1, 4 in that order.\n</span><span class=\"kw\">for </span>x <span class=\"kw\">in </span>a.symmetric_difference(<span class=\"kw-2\">&amp;</span>b) {\n <span class=\"macro\">println!</span>(<span class=\"string\">\"{}\"</span>, x);\n}\n\n<span class=\"kw\">let </span>diff1: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = a.symmetric_difference(<span class=\"kw-2\">&amp;</span>b).collect();\n<span class=\"kw\">let </span>diff2: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = b.symmetric_difference(<span class=\"kw-2\">&amp;</span>a).collect();\n\n<span class=\"macro\">assert_eq!</span>(diff1, diff2);\n<span class=\"macro\">assert_eq!</span>(diff1, [<span class=\"number\">1</span>, <span class=\"number\">4</span>].iter().collect::&lt;FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt;&gt;());</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.intersection\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#288-299\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.intersection\" class=\"fn\">intersection</a>&lt;'a, S2, const N2: usize&gt;(\n &amp;'a self,\n other: &amp;'a <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S2, N2&gt;,\n) -&gt; Intersection&lt;'a, T, S2, N2&gt;<div class=\"where\">where\n S2: BuildHasher,</div></h4></section></summary><div class=\"docblock\"><p>Visits the values representing the intersection, i.e. the values that are both in <code>self</code> and\n<code>other</code>.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>a: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">1</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>].iter().cloned().collect();\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>b: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">4</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>, <span class=\"number\">4</span>].iter().cloned().collect();\n\n<span class=\"comment\">// Print 2, 3 in that order.\n</span><span class=\"kw\">for </span>x <span class=\"kw\">in </span>a.intersection(<span class=\"kw-2\">&amp;</span>b) {\n <span class=\"macro\">println!</span>(<span class=\"string\">\"{}\"</span>, x);\n}\n\n<span class=\"kw\">let </span>intersection: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = a.intersection(<span class=\"kw-2\">&amp;</span>b).collect();\n<span class=\"macro\">assert_eq!</span>(intersection, [<span class=\"number\">2</span>, <span class=\"number\">3</span>].iter().collect::&lt;FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt;&gt;());</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.union\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#320-328\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.union\" class=\"fn\">union</a>&lt;'a, S2, const N2: usize&gt;(\n &amp;'a self,\n other: &amp;'a <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S2, N2&gt;,\n) -&gt; impl Iterator&lt;Item = &amp;'a T&gt;<div class=\"where\">where\n S2: BuildHasher,</div></h4></section></summary><div class=\"docblock\"><p>Visits the values representing the union, i.e. all the values in <code>self</code> or <code>other</code>, without\nduplicates.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>a: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">1</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>].iter().cloned().collect();\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>b: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">4</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>, <span class=\"number\">4</span>].iter().cloned().collect();\n\n<span class=\"comment\">// Print 1, 2, 3, 4 in that order.\n</span><span class=\"kw\">for </span>x <span class=\"kw\">in </span>a.union(<span class=\"kw-2\">&amp;</span>b) {\n <span class=\"macro\">println!</span>(<span class=\"string\">\"{}\"</span>, x);\n}\n\n<span class=\"kw\">let union</span>: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = a.union(<span class=\"kw-2\">&amp;</span>b).collect();\n<span class=\"macro\">assert_eq!</span>(union, [<span class=\"number\">1</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>, <span class=\"number\">4</span>].iter().collect::&lt;FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt;&gt;());</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.contains\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#344-350\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.contains\" class=\"fn\">contains</a>&lt;Q&gt;(&amp;self, value: &amp;Q) -&gt; bool<div class=\"where\">where\n T: Borrow&lt;Q&gt;,\n Q: ?Sized + Eq + Hash,</div></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if the set contains a value.</p>\n<p>The value may be any borrowed form of the sets value type, but <code>Hash</code> and <code>Eq</code> on the\nborrowed form must match those for the value type.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span>set: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">1</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>].iter().cloned().collect();\n<span class=\"macro\">assert_eq!</span>(set.contains(<span class=\"kw-2\">&amp;</span><span class=\"number\">1</span>), <span class=\"bool-val\">true</span>);\n<span class=\"macro\">assert_eq!</span>(set.contains(<span class=\"kw-2\">&amp;</span><span class=\"number\">4</span>), <span class=\"bool-val\">false</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_disjoint\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#369-374\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.is_disjoint\" class=\"fn\">is_disjoint</a>&lt;S2, const N2: usize&gt;(\n &amp;self,\n other: &amp;<a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S2, N2&gt;,\n) -&gt; bool<div class=\"where\">where\n S2: BuildHasher,</div></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> has no elements in common with <code>other</code>. This is equivalent to\nchecking for an empty intersection.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span>a: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">1</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>].iter().cloned().collect();\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>b = FnvIndexSet::&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt;::new();\n\n<span class=\"macro\">assert_eq!</span>(a.is_disjoint(<span class=\"kw-2\">&amp;</span>b), <span class=\"bool-val\">true</span>);\nb.insert(<span class=\"number\">4</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(a.is_disjoint(<span class=\"kw-2\">&amp;</span>b), <span class=\"bool-val\">true</span>);\nb.insert(<span class=\"number\">1</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(a.is_disjoint(<span class=\"kw-2\">&amp;</span>b), <span class=\"bool-val\">false</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_subset\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#393-398\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.is_subset\" class=\"fn\">is_subset</a>&lt;S2, const N2: usize&gt;(\n &amp;self,\n other: &amp;<a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S2, N2&gt;,\n) -&gt; bool<div class=\"where\">where\n S2: BuildHasher,</div></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if the set is a subset of another, i.e. <code>other</code> contains at least all the\nvalues in <code>self</code>.</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span>sup: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">1</span>, <span class=\"number\">2</span>, <span class=\"number\">3</span>].iter().cloned().collect();\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>set = FnvIndexSet::&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt;::new();\n\n<span class=\"macro\">assert_eq!</span>(set.is_subset(<span class=\"kw-2\">&amp;</span>sup), <span class=\"bool-val\">true</span>);\nset.insert(<span class=\"number\">2</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(set.is_subset(<span class=\"kw-2\">&amp;</span>sup), <span class=\"bool-val\">true</span>);\nset.insert(<span class=\"number\">4</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(set.is_subset(<span class=\"kw-2\">&amp;</span>sup), <span class=\"bool-val\">false</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_superset\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#420-425\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.is_superset\" class=\"fn\">is_superset</a>&lt;S2, const N2: usize&gt;(\n &amp;self,\n other: &amp;<a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S2, N2&gt;,\n) -&gt; bool<div class=\"where\">where\n S2: BuildHasher,</div></h4></section></summary><div class=\"docblock\"><h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span>sub: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = [<span class=\"number\">1</span>, <span class=\"number\">2</span>].iter().cloned().collect();\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>set = FnvIndexSet::&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt;::new();\n\n<span class=\"macro\">assert_eq!</span>(set.is_superset(<span class=\"kw-2\">&amp;</span>sub), <span class=\"bool-val\">false</span>);\n\nset.insert(<span class=\"number\">0</span>).unwrap();\nset.insert(<span class=\"number\">1</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(set.is_superset(<span class=\"kw-2\">&amp;</span>sub), <span class=\"bool-val\">false</span>);\n\nset.insert(<span class=\"number\">2</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(set.is_superset(<span class=\"kw-2\">&amp;</span>sub), <span class=\"bool-val\">true</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.insert\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#444-449\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.insert\" class=\"fn\">insert</a>(&amp;mut self, value: T) -&gt; Result&lt;bool, T&gt;</h4></section></summary><div class=\"docblock\"><p>Adds a value to the set.</p>\n<p>If the set did not have this value present, <code>true</code> is returned.</p>\n<p>If the set did have this value present, <code>false</code> is returned.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>set = FnvIndexSet::&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt;::new();\n\n<span class=\"macro\">assert_eq!</span>(set.insert(<span class=\"number\">2</span>).unwrap(), <span class=\"bool-val\">true</span>);\n<span class=\"macro\">assert_eq!</span>(set.insert(<span class=\"number\">2</span>).unwrap(), <span class=\"bool-val\">false</span>);\n<span class=\"macro\">assert_eq!</span>(set.len(), <span class=\"number\">1</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.remove\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#467-473\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.remove\" class=\"fn\">remove</a>&lt;Q&gt;(&amp;mut self, value: &amp;Q) -&gt; bool<div class=\"where\">where\n T: Borrow&lt;Q&gt;,\n Q: ?Sized + Eq + Hash,</div></h4></section></summary><div class=\"docblock\"><p>Removes a value from the set. Returns <code>true</code> if the value was present in the set.</p>\n<p>The value may be any borrowed form of the sets value type, but <code>Hash</code> and <code>Eq</code> on the\nborrowed form must match those for the value type.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>set = FnvIndexSet::&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt;::new();\n\nset.insert(<span class=\"number\">2</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(set.remove(<span class=\"kw-2\">&amp;</span><span class=\"number\">2</span>), <span class=\"bool-val\">true</span>);\n<span class=\"macro\">assert_eq!</span>(set.remove(<span class=\"kw-2\">&amp;</span><span class=\"number\">2</span>), <span class=\"bool-val\">false</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.retain\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#478-483\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.retain\" class=\"fn\">retain</a>&lt;F&gt;(&amp;mut self, f: F)<div class=\"where\">where\n F: FnMut(&amp;T) -&gt; bool,</div></h4></section></summary><div class=\"docblock\"><p>Retains only the elements specified by the predicate.</p>\n<p>In other words, remove all elements <code>e</code> for which <code>f(&amp;e)</code> returns <code>false</code>.</p>\n</div></details></div></details>",0,"heapless::indexset::FnvIndexSet"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-IndexSet%3CT,+S,+N%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#95-193\">Source</a><a href=\"#impl-IndexSet%3CT,+S,+N%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T, S, const N: usize&gt; <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S, N&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.capacity\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#106-108\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.capacity\" class=\"fn\">capacity</a>(&amp;self) -&gt; usize</h4></section></summary><div class=\"docblock\"><p>Returns the number of elements the set can hold</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span>set = FnvIndexSet::&lt;i32, <span class=\"number\">16</span>&gt;::new();\n<span class=\"macro\">assert_eq!</span>(set.capacity(), <span class=\"number\">16</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.iter\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#126-130\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.iter\" class=\"fn\">iter</a>(&amp;self) -&gt; <a class=\"struct\" href=\"heapless/struct.IndexSetIter.html\" title=\"struct heapless::IndexSetIter\">Iter</a>&lt;'_, T&gt; <a href=\"#\" class=\"tooltip\" data-notable-ty=\"Iter&lt;&#39;_, T&gt;\">ⓘ</a></h4></section></summary><div class=\"docblock\"><p>Return an iterator over the values of the set, in insertion order</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>set = FnvIndexSet::&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt;::new();\nset.insert(<span class=\"string\">\"a\"</span>).unwrap();\nset.insert(<span class=\"string\">\"b\"</span>).unwrap();\n\n<span class=\"comment\">// Will print in insertion order: a, b\n</span><span class=\"kw\">for </span>x <span class=\"kw\">in </span>set.iter() {\n <span class=\"macro\">println!</span>(<span class=\"string\">\"{}\"</span>, x);\n}</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.first\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#135-137\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.first\" class=\"fn\">first</a>(&amp;self) -&gt; Option&lt;&amp;T&gt;</h4></section></summary><div class=\"docblock\"><p>Get the first value</p>\n<p>Computes in <strong>O(1)</strong> time</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.last\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#142-144\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.last\" class=\"fn\">last</a>(&amp;self) -&gt; Option&lt;&amp;T&gt;</h4></section></summary><div class=\"docblock\"><p>Get the last value</p>\n<p>Computes in <strong>O(1)</strong> time</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.len\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#158-160\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.len\" class=\"fn\">len</a>(&amp;self) -&gt; usize</h4></section></summary><div class=\"docblock\"><p>Returns the number of elements in the set.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>v: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = FnvIndexSet::new();\n<span class=\"macro\">assert_eq!</span>(v.len(), <span class=\"number\">0</span>);\nv.insert(<span class=\"number\">1</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(v.len(), <span class=\"number\">1</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_empty\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#174-176\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.is_empty\" class=\"fn\">is_empty</a>(&amp;self) -&gt; bool</h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if the set contains no elements.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>v: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = FnvIndexSet::new();\n<span class=\"macro\">assert!</span>(v.is_empty());\nv.insert(<span class=\"number\">1</span>).unwrap();\n<span class=\"macro\">assert!</span>(!v.is_empty());</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.clear\" class=\"method\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#190-192\">Source</a><h4 class=\"code-header\">pub fn <a href=\"heapless/struct.IndexSet.html#tymethod.clear\" class=\"fn\">clear</a>(&amp;mut self)</h4></section></summary><div class=\"docblock\"><p>Clears the set, removing all values.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>heapless::FnvIndexSet;\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>v: FnvIndexSet&lt;<span class=\"kw\">_</span>, <span class=\"number\">16</span>&gt; = FnvIndexSet::new();\nv.insert(<span class=\"number\">1</span>).unwrap();\nv.clear();\n<span class=\"macro\">assert!</span>(v.is_empty());</code></pre></div>\n</div></details></div></details>",0,"heapless::indexset::FnvIndexSet"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-PartialEq%3CIndexSet%3CT,+S2,+N2%3E%3E-for-IndexSet%3CT,+S1,+N1%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#518-528\">Source</a><a href=\"#impl-PartialEq%3CIndexSet%3CT,+S2,+N2%3E%3E-for-IndexSet%3CT,+S1,+N1%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T, S1, S2, const N1: usize, const N2: usize&gt; PartialEq&lt;<a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S2, N2&gt;&gt; for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S1, N1&gt;<div class=\"where\">where\n T: Eq + Hash,\n S1: BuildHasher,\n S2: BuildHasher,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.eq\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/heapless/indexset.rs.html#525-527\">Source</a><a href=\"#method.eq\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">eq</a>(&amp;self, other: &amp;<a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a>&lt;T, S2, N2&gt;) -&gt; bool</h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ne\" class=\"method trait-impl\"><span class=\"since rightside\" title=\"Stable since Rust version 1.0.0\">1.0.0</span><a href=\"#method.ne\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a class=\"fn\">ne</a>(&amp;self, other: &amp;Rhs) -&gt; bool</h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.</div></details></div></details>","PartialEq<IndexSet<T, S2, N2>>","heapless::indexset::FnvIndexSet"]]]]);
if (window.register_type_impls) {
window.register_type_impls(type_impls);
} else {
window.pending_type_impls = type_impls;
}
})()
//{"start":55,"fragment_lengths":[41400]}