mirror of
https://github.com/esp-rs/esp-idf-hal.git
synced 2025-12-30 13:11:08 +00:00
9 lines
41 KiB
JavaScript
9 lines
41 KiB
JavaScript
(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<T, S, const N: usize> Clone for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S, N><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>(&self) -> 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>(&mut self, source: &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<T, S, const N: usize> Debug for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S, N><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>(&self, f: &mut Formatter<'_>) -> 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<T, S, const N: usize> Default for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S, N><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>() -> 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<'a, T, S, const N: usize> Extend<&'a T> for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S, N><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><I>(&mut self, iterable: I)<div class=\"where\">where\n I: IntoIterator<Item = &'a T>,</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>(&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>(&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<T, S, const N: usize> Extend<T> for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S, N><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><I>(&mut self, iterable: I)<div class=\"where\">where\n I: IntoIterator<Item = T>,</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>(&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>(&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<T, S, const N: usize> FromIterator<T> for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S, N><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><I>(iter: I) -> Self<div class=\"where\">where\n I: IntoIterator<Item = T>,</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<T, S, const N: usize> <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, <a class=\"struct\" href=\"hash32/struct.BuildHasherDefault.html\" title=\"struct hash32::BuildHasherDefault\">BuildHasherDefault</a><S>, N></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>() -> 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<T, S, const N: usize> <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S, N><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><'a, S2, const N2: usize>(\n &'a self,\n other: &'a <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S2, N2>,\n) -> Difference<'a, T, S2, N2><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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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\">&</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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = a.difference(<span class=\"kw-2\">&</span>b).collect();\n<span class=\"macro\">assert_eq!</span>(diff, [<span class=\"number\">1</span>].iter().collect::<FnvIndexSet<<span class=\"kw\">_</span>, <span class=\"number\">16</span>>>());\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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = b.difference(<span class=\"kw-2\">&</span>a).collect();\n<span class=\"macro\">assert_eq!</span>(diff, [<span class=\"number\">4</span>].iter().collect::<FnvIndexSet<<span class=\"kw\">_</span>, <span class=\"number\">16</span>>>());</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><'a, S2, const N2: usize>(\n &'a self,\n other: &'a <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S2, N2>,\n) -> impl Iterator<Item = &'a T><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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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\">&</span>b) {\n <span class=\"macro\">println!</span>(<span class=\"string\">\"{}\"</span>, x);\n}\n\n<span class=\"kw\">let </span>diff1: FnvIndexSet<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = a.symmetric_difference(<span class=\"kw-2\">&</span>b).collect();\n<span class=\"kw\">let </span>diff2: FnvIndexSet<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = b.symmetric_difference(<span class=\"kw-2\">&</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::<FnvIndexSet<<span class=\"kw\">_</span>, <span class=\"number\">16</span>>>());</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><'a, S2, const N2: usize>(\n &'a self,\n other: &'a <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S2, N2>,\n) -> Intersection<'a, T, S2, N2><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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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\">&</span>b) {\n <span class=\"macro\">println!</span>(<span class=\"string\">\"{}\"</span>, x);\n}\n\n<span class=\"kw\">let </span>intersection: FnvIndexSet<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = a.intersection(<span class=\"kw-2\">&</span>b).collect();\n<span class=\"macro\">assert_eq!</span>(intersection, [<span class=\"number\">2</span>, <span class=\"number\">3</span>].iter().collect::<FnvIndexSet<<span class=\"kw\">_</span>, <span class=\"number\">16</span>>>());</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><'a, S2, const N2: usize>(\n &'a self,\n other: &'a <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S2, N2>,\n) -> impl Iterator<Item = &'a T><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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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\">&</span>b) {\n <span class=\"macro\">println!</span>(<span class=\"string\">\"{}\"</span>, x);\n}\n\n<span class=\"kw\">let union</span>: FnvIndexSet<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = a.union(<span class=\"kw-2\">&</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::<FnvIndexSet<<span class=\"kw\">_</span>, <span class=\"number\">16</span>>>());</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><Q>(&self, value: &Q) -> bool<div class=\"where\">where\n T: Borrow<Q>,\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 set’s 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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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\">&</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\">&</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><S2, const N2: usize>(\n &self,\n other: &<a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S2, N2>,\n) -> 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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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::<<span class=\"kw\">_</span>, <span class=\"number\">16</span>>::new();\n\n<span class=\"macro\">assert_eq!</span>(a.is_disjoint(<span class=\"kw-2\">&</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\">&</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\">&</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><S2, const N2: usize>(\n &self,\n other: &<a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S2, N2>,\n) -> 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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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::<<span class=\"kw\">_</span>, <span class=\"number\">16</span>>::new();\n\n<span class=\"macro\">assert_eq!</span>(set.is_subset(<span class=\"kw-2\">&</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\">&</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\">&</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><S2, const N2: usize>(\n &self,\n other: &<a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S2, N2>,\n) -> 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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = [<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::<<span class=\"kw\">_</span>, <span class=\"number\">16</span>>::new();\n\n<span class=\"macro\">assert_eq!</span>(set.is_superset(<span class=\"kw-2\">&</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\">&</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\">&</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>(&mut self, value: T) -> Result<bool, T></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::<<span class=\"kw\">_</span>, <span class=\"number\">16</span>>::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><Q>(&mut self, value: &Q) -> bool<div class=\"where\">where\n T: Borrow<Q>,\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 set’s 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::<<span class=\"kw\">_</span>, <span class=\"number\">16</span>>::new();\n\nset.insert(<span class=\"number\">2</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(set.remove(<span class=\"kw-2\">&</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\">&</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><F>(&mut self, f: F)<div class=\"where\">where\n F: FnMut(&T) -> 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(&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<T, S, const N: usize> <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S, N></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>(&self) -> 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::<i32, <span class=\"number\">16</span>>::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>(&self) -> <a class=\"struct\" href=\"heapless/struct.IndexSetIter.html\" title=\"struct heapless::IndexSetIter\">Iter</a><'_, T> <a href=\"#\" class=\"tooltip\" data-notable-ty=\"Iter<'_, T>\">ⓘ</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::<<span class=\"kw\">_</span>, <span class=\"number\">16</span>>::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>(&self) -> Option<&T></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>(&self) -> Option<&T></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>(&self) -> 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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = 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>(&self) -> 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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = 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>(&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<<span class=\"kw\">_</span>, <span class=\"number\">16</span>> = 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<T, S1, S2, const N1: usize, const N2: usize> PartialEq<<a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S2, N2>> for <a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S1, N1><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>(&self, other: &<a class=\"struct\" href=\"heapless/struct.IndexSet.html\" title=\"struct heapless::IndexSet\">IndexSet</a><T, S2, N2>) -> 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>(&self, other: &Rhs) -> 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]}
|