Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 0c2243f8a1696816431e7210e991fa52 > files > 15751

rust-doc-1.35.0-1.mga7.armv7hl.rpm

<!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 `Extend` trait in crate `std`."><meta name="keywords" content="rust, rustlang, rust-lang, Extend"><title>std::iter::Extend - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize1.35.0.css"><link rel="stylesheet" type="text/css" href="../../rustdoc1.35.0.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark1.35.0.css"><link rel="stylesheet" type="text/css" href="../../light1.35.0.css" id="themeStyle"><script src="../../storage1.35.0.js"></script><noscript><link rel="stylesheet" href="../../noscript1.35.0.css"></noscript><link rel="shortcut icon" href="../../favicon1.35.0.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow1.35.0.svg");}</style></head><body class="rustdoc trait"><!--[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='../../std/index.html'><img src='../../rust-logo1.35.0.png' alt='logo' width='100'></a><p class='location'>Trait Extend</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.extend">extend</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>iter</a></p><script>window.sidebarCurrent = {name: 'Extend', ty: 'trait', 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="../../brush1.35.0.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme1.35.0.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="../../wheel1.35.0.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><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/core/iter/traits/collect.rs.html#320-342' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>std</a>::<wbr><a href='index.html'>iter</a>::<wbr><a class="trait" href=''>Extend</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait Extend&lt;A&gt; {
    fn <a href='#tymethod.extend' class='fnname'>extend</a>&lt;T&gt;(&amp;mut self, iter: T)<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = A&gt;</span>;
}</pre></div><div class='docblock'><p>Extend a collection with the contents of an iterator.</p>
<p>Iterators produce a series of values, and collections can also be thought
of as a series of values. The <code>Extend</code> trait bridges this gap, allowing you
to extend a collection by including the contents of that iterator. When
extending a collection with an already existing key, that entry is updated
or, in the case of collections that permit multiple entries with equal
keys, that entry is inserted.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<p>Basic usage:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="comment">// You can extend a String with some chars:</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">message</span> <span class="op">=</span> <span class="ident">String</span>::<span class="ident">from</span>(<span class="string">&quot;The first three letters are: &quot;</span>);

<span class="ident">message</span>.<span class="ident">extend</span>(<span class="kw-2">&amp;</span>[<span class="string">&#39;a&#39;</span>, <span class="string">&#39;b&#39;</span>, <span class="string">&#39;c&#39;</span>]);

<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">&quot;abc&quot;</span>, <span class="kw-2">&amp;</span><span class="ident">message</span>[<span class="number">29</span>..<span class="number">32</span>]);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%2F%2F%20You%20can%20extend%20a%20String%20with%20some%20chars%3A%0Afn%20main()%20%7B%0Alet%20mut%20message%20%3D%20String%3A%3Afrom(%22The%20first%20three%20letters%20are%3A%20%22)%3B%0A%0Amessage.extend(%26%5B'a'%2C%20'b'%2C%20'c'%5D)%3B%0A%0Aassert_eq!(%22abc%22%2C%20%26message%5B29..32%5D)%3B%0A%7D">Run</a></pre></div>
<p>Implementing <code>Extend</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="comment">// A sample collection, that&#39;s just a wrapper over Vec&lt;T&gt;</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
<span class="kw">struct</span> <span class="ident">MyCollection</span>(<span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">i32</span><span class="op">&gt;</span>);

<span class="comment">// Let&#39;s give it some methods so we can create one and add things</span>
<span class="comment">// to it.</span>
<span class="kw">impl</span> <span class="ident">MyCollection</span> {
    <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-&gt;</span> <span class="ident">MyCollection</span> {
        <span class="ident">MyCollection</span>(<span class="ident">Vec</span>::<span class="ident">new</span>())
    }

    <span class="kw">fn</span> <span class="ident">add</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">elem</span>: <span class="ident">i32</span>) {
        <span class="self">self</span>.<span class="number">0</span>.<span class="ident">push</span>(<span class="ident">elem</span>);
    }
}

<span class="comment">// since MyCollection has a list of i32s, we implement Extend for i32</span>
<span class="kw">impl</span> <span class="ident">Extend</span><span class="op">&lt;</span><span class="ident">i32</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">MyCollection</span> {

    <span class="comment">// This is a bit simpler with the concrete type signature: we can call</span>
    <span class="comment">// extend on anything which can be turned into an Iterator which gives</span>
    <span class="comment">// us i32s. Because we need i32s to put into MyCollection.</span>
    <span class="kw">fn</span> <span class="ident">extend</span><span class="op">&lt;</span><span class="ident">T</span>: <span class="ident">IntoIterator</span><span class="op">&lt;</span><span class="ident">Item</span><span class="op">=</span><span class="ident">i32</span><span class="op">&gt;&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">iter</span>: <span class="ident">T</span>) {

        <span class="comment">// The implementation is very straightforward: loop through the</span>
        <span class="comment">// iterator, and add() each element to ourselves.</span>
        <span class="kw">for</span> <span class="ident">elem</span> <span class="kw">in</span> <span class="ident">iter</span> {
            <span class="self">self</span>.<span class="ident">add</span>(<span class="ident">elem</span>);
        }
    }
}

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">c</span> <span class="op">=</span> <span class="ident">MyCollection</span>::<span class="ident">new</span>();

<span class="ident">c</span>.<span class="ident">add</span>(<span class="number">5</span>);
<span class="ident">c</span>.<span class="ident">add</span>(<span class="number">6</span>);
<span class="ident">c</span>.<span class="ident">add</span>(<span class="number">7</span>);

<span class="comment">// let&#39;s extend our collection with three more numbers</span>
<span class="ident">c</span>.<span class="ident">extend</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);

<span class="comment">// we&#39;ve added these elements onto the end</span>
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">&quot;MyCollection([5, 6, 7, 1, 2, 3])&quot;</span>, <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;{:?}&quot;</span>, <span class="ident">c</span>));<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%2F%2F%20A%20sample%20collection%2C%20that's%20just%20a%20wrapper%20over%20Vec%3CT%3E%0Afn%20main()%20%7B%0A%23%5Bderive(Debug)%5D%0Astruct%20MyCollection(Vec%3Ci32%3E)%3B%0A%0A%2F%2F%20Let's%20give%20it%20some%20methods%20so%20we%20can%20create%20one%20and%20add%20things%0A%2F%2F%20to%20it.%0Aimpl%20MyCollection%20%7B%0A%20%20%20%20fn%20new()%20-%3E%20MyCollection%20%7B%0A%20%20%20%20%20%20%20%20MyCollection(Vec%3A%3Anew())%0A%20%20%20%20%7D%0A%0A%20%20%20%20fn%20add(%26mut%20self%2C%20elem%3A%20i32)%20%7B%0A%20%20%20%20%20%20%20%20self.0.push(elem)%3B%0A%20%20%20%20%7D%0A%7D%0A%0A%2F%2F%20since%20MyCollection%20has%20a%20list%20of%20i32s%2C%20we%20implement%20Extend%20for%20i32%0Aimpl%20Extend%3Ci32%3E%20for%20MyCollection%20%7B%0A%0A%20%20%20%20%2F%2F%20This%20is%20a%20bit%20simpler%20with%20the%20concrete%20type%20signature%3A%20we%20can%20call%0A%20%20%20%20%2F%2F%20extend%20on%20anything%20which%20can%20be%20turned%20into%20an%20Iterator%20which%20gives%0A%20%20%20%20%2F%2F%20us%20i32s.%20Because%20we%20need%20i32s%20to%20put%20into%20MyCollection.%0A%20%20%20%20fn%20extend%3CT%3A%20IntoIterator%3CItem%3Di32%3E%3E(%26mut%20self%2C%20iter%3A%20T)%20%7B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20The%20implementation%20is%20very%20straightforward%3A%20loop%20through%20the%0A%20%20%20%20%20%20%20%20%2F%2F%20iterator%2C%20and%20add()%20each%20element%20to%20ourselves.%0A%20%20%20%20%20%20%20%20for%20elem%20in%20iter%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20self.add(elem)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D%0A%0Alet%20mut%20c%20%3D%20MyCollection%3A%3Anew()%3B%0A%0Ac.add(5)%3B%0Ac.add(6)%3B%0Ac.add(7)%3B%0A%0A%2F%2F%20let's%20extend%20our%20collection%20with%20three%20more%20numbers%0Ac.extend(vec!%5B1%2C%202%2C%203%5D)%3B%0A%0A%2F%2F%20we've%20added%20these%20elements%20onto%20the%20end%0Aassert_eq!(%22MyCollection(%5B5%2C%206%2C%207%2C%201%2C%202%2C%203%5D)%22%2C%20format!(%22%7B%3A%3F%7D%22%2C%20c))%3B%0A%7D">Run</a></pre></div>
</div>
            <h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.extend' class='method'><code id='extend.v'>fn <a href='#tymethod.extend' class='fnname'>extend</a>&lt;T&gt;(&amp;mut self, iter: T) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = A&gt;,&nbsp;</span></code></h3><div class='docblock'><p>Extends a collection with the contents of an iterator.</p>
<p>As this is the only method for this trait, the <a href="trait.Extend.html">trait-level</a> docs
contain more details.</p>
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
<p>Basic usage:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="comment">// You can extend a String with some chars:</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">message</span> <span class="op">=</span> <span class="ident">String</span>::<span class="ident">from</span>(<span class="string">&quot;abc&quot;</span>);

<span class="ident">message</span>.<span class="ident">extend</span>([<span class="string">&#39;d&#39;</span>, <span class="string">&#39;e&#39;</span>, <span class="string">&#39;f&#39;</span>].<span class="ident">iter</span>());

<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">&quot;abcdef&quot;</span>, <span class="kw-2">&amp;</span><span class="ident">message</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%2F%2F%20You%20can%20extend%20a%20String%20with%20some%20chars%3A%0Afn%20main()%20%7B%0Alet%20mut%20message%20%3D%20String%3A%3Afrom(%22abc%22)%3B%0A%0Amessage.extend(%5B'd'%2C%20'e'%2C%20'f'%5D.iter())%3B%0A%0Aassert_eq!(%22abcdef%22%2C%20%26message)%3B%0A%7D">Run</a></pre></div>
</div></div><span class='loading-content'>Loading content...</span>
            <h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-Extend%3Cchar%3E' class='impl'><code class='in-band'>impl Extend&lt;<a class="primitive" href="../primitive.char.html">char</a>&gt; for <a class="struct" href="../../std/string/struct.String.html" title="struct std::string::String">String</a></code><a href='#impl-Extend%3Cchar%3E' class='anchor'></a><a class='srclink' href='../../src/alloc/string.rs.html#1757-1764' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend' class="method hidden"><code id='extend.v-1'>fn <a href='#method.extend' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.char.html">char</a>&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/string.rs.html#1758-1763' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C()%3E' class='impl'><code class='in-band'>impl Extend&lt;<a class="primitive" href="../primitive.unit.html">()</a>&gt; for <a class="primitive" href="../primitive.unit.html">()</a></code><a href='#impl-Extend%3C()%3E' class='anchor'></a><a class='srclink' href='../../src/core/iter/traits/collect.rs.html#345-349' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-1' class="method hidden"><code id='extend.v-2'>fn <a href='#method.extend-1' class='fnname'>extend</a>&lt;T&gt;(&amp;mut self, iter: T) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.unit.html">()</a>&gt;,&nbsp;</span></code><a class='srclink' href='../../src/core/iter/traits/collect.rs.html#346-348' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3CString%3E' class='impl'><code class='in-band'>impl Extend&lt;<a class="struct" href="../../std/string/struct.String.html" title="struct std::string::String">String</a>&gt; for <a class="struct" href="../../std/string/struct.String.html" title="struct std::string::String">String</a></code><a href='#impl-Extend%3CString%3E' class='anchor'></a><a class='srclink' href='../../src/alloc/string.rs.html#1781-1785' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-2' class="method hidden"><code id='extend.v-3'>fn <a href='#method.extend-2' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="struct" href="../../std/string/struct.String.html" title="struct std::string::String">String</a>&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/string.rs.html#1782-1784' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C%26%27a%20char%3E' class='impl'><code class='in-band'>impl&lt;'a&gt; Extend&lt;&amp;'a <a class="primitive" href="../primitive.char.html">char</a>&gt; for <a class="struct" href="../../std/string/struct.String.html" title="struct std::string::String">String</a></code><a href='#impl-Extend%3C%26%27a%20char%3E' class='anchor'></a><a class='srclink' href='../../src/alloc/string.rs.html#1767-1771' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-3' class="method hidden"><code id='extend.v-4'>fn <a href='#method.extend-3' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = &amp;'a <a class="primitive" href="../primitive.char.html">char</a>&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/string.rs.html#1768-1770' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C%26%27a%20str%3E' class='impl'><code class='in-band'>impl&lt;'a&gt; Extend&lt;&amp;'a <a class="primitive" href="../primitive.str.html">str</a>&gt; for <a class="struct" href="../../std/string/struct.String.html" title="struct std::string::String">String</a></code><a href='#impl-Extend%3C%26%27a%20str%3E' class='anchor'></a><a class='srclink' href='../../src/alloc/string.rs.html#1774-1778' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-4' class="method hidden"><code id='extend.v-5'>fn <a href='#method.extend-4' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = &amp;'a <a class="primitive" href="../primitive.str.html">str</a>&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/string.rs.html#1775-1777' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3CCow%3C%27a%2C%20str%3E%3E' class='impl'><code class='in-band'>impl&lt;'a&gt; Extend&lt;<a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="primitive" href="../primitive.str.html">str</a>&gt;&gt; for <a class="struct" href="../../std/string/struct.String.html" title="struct std::string::String">String</a></code><a href='#impl-Extend%3CCow%3C%27a%2C%20str%3E%3E' class='anchor'></a><a class='srclink' href='../../src/alloc/string.rs.html#1788-1792' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-5' class="method hidden"><code id='extend.v-6'>fn <a href='#method.extend-5' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="primitive" href="../primitive.str.html">str</a>&gt;&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/string.rs.html#1789-1791' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C(%26%27a%20K%2C%20%26%27a%20V)%3E' class='impl'><code class='in-band'>impl&lt;'a, K, V&gt; Extend&lt;<a class="primitive" href="../primitive.tuple.html">(</a><a class="primitive" href="../primitive.reference.html">&amp;'a </a>K, <a class="primitive" href="../primitive.reference.html">&amp;'a </a>V<a class="primitive" href="../primitive.tuple.html">)</a>&gt; for <a class="struct" href="../../std/collections/btree_map/struct.BTreeMap.html" title="struct std::collections::btree_map::BTreeMap">BTreeMap</a>&lt;K, V&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="../../std/marker/trait.Copy.html" title="trait std::marker::Copy">Copy</a> + <a class="trait" href="../../std/cmp/trait.Ord.html" title="trait std::cmp::Ord">Ord</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;V: <a class="trait" href="../../std/marker/trait.Copy.html" title="trait std::marker::Copy">Copy</a>,&nbsp;</span></code><a href='#impl-Extend%3C(%26%27a%20K%2C%20%26%27a%20V)%3E' class='anchor'></a><a class='srclink' href='../../src/alloc/collections/btree/map.rs.html#1737-1741' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-6' class="method hidden"><code id='extend.v-7'>fn <a href='#method.extend-6' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.tuple.html">(</a><a class="primitive" href="../primitive.reference.html">&amp;'a </a>K, <a class="primitive" href="../primitive.reference.html">&amp;'a </a>V<a class="primitive" href="../primitive.tuple.html">)</a>&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/collections/btree/map.rs.html#1738-1740' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C(%26%27a%20K%2C%20%26%27a%20V)%3E-1' class='impl'><code class='in-band'>impl&lt;'a, K, V, S&gt; Extend&lt;<a class="primitive" href="../primitive.tuple.html">(</a><a class="primitive" href="../primitive.reference.html">&amp;'a </a>K, <a class="primitive" href="../primitive.reference.html">&amp;'a </a>V<a class="primitive" href="../primitive.tuple.html">)</a>&gt; for <a class="struct" href="../../std/collections/struct.HashMap.html" title="struct std::collections::HashMap">HashMap</a>&lt;K, V, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="../../std/cmp/trait.Eq.html" title="trait std::cmp::Eq">Eq</a> + <a class="trait" href="../../std/hash/trait.Hash.html" title="trait std::hash::Hash">Hash</a> + <a class="trait" href="../../std/marker/trait.Copy.html" title="trait std::marker::Copy">Copy</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;V: <a class="trait" href="../../std/marker/trait.Copy.html" title="trait std::marker::Copy">Copy</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../std/hash/trait.BuildHasher.html" title="trait std::hash::BuildHasher">BuildHasher</a>,&nbsp;</span></code><a href='#impl-Extend%3C(%26%27a%20K%2C%20%26%27a%20V)%3E-1' class='anchor'></a><a class='srclink' href='../../src/std/collections/hash/map.rs.html#3118-3126' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-7' class="method hidden"><code id='extend.v-8'>fn <a href='#method.extend-7' class='fnname'>extend</a>&lt;T:&nbsp;<a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.tuple.html">(</a><a class="primitive" href="../primitive.reference.html">&amp;'a </a>K, <a class="primitive" href="../primitive.reference.html">&amp;'a </a>V<a class="primitive" href="../primitive.tuple.html">)</a>&gt;&gt;(&amp;mut self, iter: T)</code><a class='srclink' href='../../src/std/collections/hash/map.rs.html#3123-3125' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C%26%27a%20T%3E' class='impl'><code class='in-band'>impl&lt;'a, T&gt; Extend&lt;<a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt; for <a class="struct" href="../../std/collections/binary_heap/struct.BinaryHeap.html" title="struct std::collections::binary_heap::BinaryHeap">BinaryHeap</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'a + <a class="trait" href="../../std/marker/trait.Copy.html" title="trait std::marker::Copy">Copy</a> + <a class="trait" href="../../std/cmp/trait.Ord.html" title="trait std::cmp::Ord">Ord</a>,&nbsp;</span></code><a href='#impl-Extend%3C%26%27a%20T%3E' class='anchor'></a><a class='srclink' href='../../src/alloc/collections/binary_heap.rs.html#1185-1189' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-8' class="method hidden"><code id='extend.v-9'>fn <a href='#method.extend-8' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/collections/binary_heap.rs.html#1186-1188' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C%26%27a%20T%3E-1' class='impl'><code class='in-band'>impl&lt;'a, T&gt; Extend&lt;<a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt; for <a class="struct" href="../../std/collections/btree_set/struct.BTreeSet.html" title="struct std::collections::btree_set::BTreeSet">BTreeSet</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'a + <a class="trait" href="../../std/marker/trait.Copy.html" title="trait std::marker::Copy">Copy</a> + <a class="trait" href="../../std/cmp/trait.Ord.html" title="trait std::cmp::Ord">Ord</a>,&nbsp;</span></code><a href='#impl-Extend%3C%26%27a%20T%3E-1' class='anchor'></a><a class='srclink' href='../../src/alloc/collections/btree/set.rs.html#893-897' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-9' class="method hidden"><code id='extend.v-10'>fn <a href='#method.extend-9' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/collections/btree/set.rs.html#894-896' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C%26%27a%20T%3E-2' class='impl'><code class='in-band'>impl&lt;'a, T&gt; Extend&lt;<a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt; for <a class="struct" href="../../std/collections/linked_list/struct.LinkedList.html" title="struct std::collections::linked_list::LinkedList">LinkedList</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'a + <a class="trait" href="../../std/marker/trait.Copy.html" title="trait std::marker::Copy">Copy</a>,&nbsp;</span></code><a href='#impl-Extend%3C%26%27a%20T%3E-2' class='anchor'></a><a class='srclink' href='../../src/alloc/collections/linked_list.rs.html#1121-1125' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-10' class="method hidden"><code id='extend.v-11'>fn <a href='#method.extend-10' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/collections/linked_list.rs.html#1122-1124' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C%26%27a%20T%3E-3' class='impl'><code class='in-band'>impl&lt;'a, T&gt; Extend&lt;<a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt; for <a class="struct" href="../../std/collections/vec_deque/struct.VecDeque.html" title="struct std::collections::vec_deque::VecDeque">VecDeque</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'a + <a class="trait" href="../../std/marker/trait.Copy.html" title="trait std::marker::Copy">Copy</a>,&nbsp;</span></code><a href='#impl-Extend%3C%26%27a%20T%3E-3' class='anchor'></a><a class='srclink' href='../../src/alloc/collections/vec_deque.rs.html#2685-2689' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-11' class="method hidden"><code id='extend.v-12'>fn <a href='#method.extend-11' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/collections/vec_deque.rs.html#2686-2688' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C%26%27a%20T%3E-4' class='impl'><code class='in-band'>impl&lt;'a, T&gt; Extend&lt;<a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt; for <a class="struct" href="../../std/vec/struct.Vec.html" title="struct std::vec::Vec">Vec</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'a + <a class="trait" href="../../std/marker/trait.Copy.html" title="trait std::marker::Copy">Copy</a>,&nbsp;</span></code><a href='#impl-Extend%3C%26%27a%20T%3E-4' class='anchor'></a><a class='srclink' href='../../src/alloc/vec.rs.html#2060-2064' title='goto source code'>[src]</a></h3><div class='docblock'><p>Extend implementation that copies elements out of references before pushing them onto the Vec.</p>
<p>This implementation is specialized for slice iterators, where it uses <a href="../../std/primitive.slice.html#method.copy_from_slice"><code>copy_from_slice</code></a> to
append the entire slice at once.</p>
</div><div class='impl-items'><h4 id='method.extend-12' class="method hidden"><code id='extend.v-13'>fn <a href='#method.extend-12' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/vec.rs.html#2061-2063' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C%26%27a%20T%3E-5' class='impl'><code class='in-band'>impl&lt;'a, T, S&gt; Extend&lt;<a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt; for <a class="struct" href="../../std/collections/struct.HashSet.html" title="struct std::collections::HashSet">HashSet</a>&lt;T, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'a + <a class="trait" href="../../std/cmp/trait.Eq.html" title="trait std::cmp::Eq">Eq</a> + <a class="trait" href="../../std/hash/trait.Hash.html" title="trait std::hash::Hash">Hash</a> + <a class="trait" href="../../std/marker/trait.Copy.html" title="trait std::marker::Copy">Copy</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../std/hash/trait.BuildHasher.html" title="trait std::hash::BuildHasher">BuildHasher</a>,&nbsp;</span></code><a href='#impl-Extend%3C%26%27a%20T%3E-5' class='anchor'></a><a class='srclink' href='../../src/std/collections/hash/set.rs.html#836-843' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-13' class="method hidden"><code id='extend.v-14'>fn <a href='#method.extend-13' class='fnname'>extend</a>&lt;I:&nbsp;<a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.reference.html">&amp;'a </a>T&gt;&gt;(&amp;mut self, iter: I)</code><a class='srclink' href='../../src/std/collections/hash/set.rs.html#840-842' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3CA%3E' class='impl'><code class='in-band'>impl&lt;A&gt; Extend&lt;A&gt; for <a class="struct" href="../../std/collections/vec_deque/struct.VecDeque.html" title="struct std::collections::vec_deque::VecDeque">VecDeque</a>&lt;A&gt;</code><a href='#impl-Extend%3CA%3E' class='anchor'></a><a class='srclink' href='../../src/alloc/collections/vec_deque.rs.html#2678-2682' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-14' class="method hidden"><code id='extend.v-15'>fn <a href='#method.extend-14' class='fnname'>extend</a>&lt;T&gt;(&amp;mut self, iter: T) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = A&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/collections/vec_deque.rs.html#2679-2681' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C(K%2C%20V)%3E' class='impl'><code class='in-band'>impl&lt;K, V&gt; Extend&lt;<a class="primitive" href="../primitive.tuple.html">(</a>K, V<a class="primitive" href="../primitive.tuple.html">)</a>&gt; for <a class="struct" href="../../std/collections/btree_map/struct.BTreeMap.html" title="struct std::collections::btree_map::BTreeMap">BTreeMap</a>&lt;K, V&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="../../std/cmp/trait.Ord.html" title="trait std::cmp::Ord">Ord</a>,&nbsp;</span></code><a href='#impl-Extend%3C(K%2C%20V)%3E' class='anchor'></a><a class='srclink' href='../../src/alloc/collections/btree/map.rs.html#1727-1734' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-15' class="method hidden"><code id='extend.v-16'>fn <a href='#method.extend-15' class='fnname'>extend</a>&lt;T&gt;(&amp;mut self, iter: T) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.tuple.html">(</a>K, V<a class="primitive" href="../primitive.tuple.html">)</a>&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/collections/btree/map.rs.html#1729-1733' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3C(K%2C%20V)%3E-1' class='impl'><code class='in-band'>impl&lt;K, V, S&gt; Extend&lt;<a class="primitive" href="../primitive.tuple.html">(</a>K, V<a class="primitive" href="../primitive.tuple.html">)</a>&gt; for <a class="struct" href="../../std/collections/struct.HashMap.html" title="struct std::collections::HashMap">HashMap</a>&lt;K, V, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="../../std/cmp/trait.Eq.html" title="trait std::cmp::Eq">Eq</a> + <a class="trait" href="../../std/hash/trait.Hash.html" title="trait std::hash::Hash">Hash</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../std/hash/trait.BuildHasher.html" title="trait std::hash::BuildHasher">BuildHasher</a>,&nbsp;</span></code><a href='#impl-Extend%3C(K%2C%20V)%3E-1' class='anchor'></a><a class='srclink' href='../../src/std/collections/hash/map.rs.html#3095-3115' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-16' class="method hidden"><code id='extend.v-17'>fn <a href='#method.extend-16' class='fnname'>extend</a>&lt;T:&nbsp;<a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="../primitive.tuple.html">(</a>K, V<a class="primitive" href="../primitive.tuple.html">)</a>&gt;&gt;(&amp;mut self, iter: T)</code><a class='srclink' href='../../src/std/collections/hash/map.rs.html#3099-3114' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3CP%3E' class='impl'><code class='in-band'>impl&lt;P:&nbsp;<a class="trait" href="../../std/convert/trait.AsRef.html" title="trait std::convert::AsRef">AsRef</a>&lt;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt; Extend&lt;P&gt; for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-Extend%3CP%3E' class='anchor'></a><a class='srclink' href='../../src/std/path.rs.html#1552-1556' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-17' class="method hidden"><code id='extend.v-18'>fn <a href='#method.extend-17' class='fnname'>extend</a>&lt;I:&nbsp;<a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = P&gt;&gt;(&amp;mut self, iter: I)</code><a class='srclink' href='../../src/std/path.rs.html#1553-1555' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; Extend&lt;T&gt; for <a class="struct" href="../../std/collections/binary_heap/struct.BinaryHeap.html" title="struct std::collections::binary_heap::BinaryHeap">BinaryHeap</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/cmp/trait.Ord.html" title="trait std::cmp::Ord">Ord</a>,&nbsp;</span></code><a href='#impl-Extend%3CT%3E' class='anchor'></a><a class='srclink' href='../../src/alloc/collections/binary_heap.rs.html#1154-1159' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-18' class="method hidden"><code id='extend.v-19'>fn <a href='#method.extend-18' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = T&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/collections/binary_heap.rs.html#1156-1158' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3CT%3E-1' class='impl'><code class='in-band'>impl&lt;T&gt; Extend&lt;T&gt; for <a class="struct" href="../../std/collections/btree_set/struct.BTreeSet.html" title="struct std::collections::btree_set::BTreeSet">BTreeSet</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/cmp/trait.Ord.html" title="trait std::cmp::Ord">Ord</a>,&nbsp;</span></code><a href='#impl-Extend%3CT%3E-1' class='anchor'></a><a class='srclink' href='../../src/alloc/collections/btree/set.rs.html#883-890' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-19' class="method hidden"><code id='extend.v-20'>fn <a href='#method.extend-19' class='fnname'>extend</a>&lt;Iter&gt;(&amp;mut self, iter: Iter) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Iter: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = T&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/collections/btree/set.rs.html#885-889' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3CT%3E-2' class='impl'><code class='in-band'>impl&lt;T&gt; Extend&lt;T&gt; for <a class="struct" href="../../std/collections/linked_list/struct.LinkedList.html" title="struct std::collections::linked_list::LinkedList">LinkedList</a>&lt;T&gt;</code><a href='#impl-Extend%3CT%3E-2' class='anchor'></a><a class='srclink' href='../../src/alloc/collections/linked_list.rs.html#1102-1106' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-20' class="method hidden"><code id='extend.v-21'>fn <a href='#method.extend-20' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = T&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/collections/linked_list.rs.html#1103-1105' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3CT%3E-3' class='impl'><code class='in-band'>impl&lt;T&gt; Extend&lt;T&gt; for <a class="struct" href="../../std/vec/struct.Vec.html" title="struct std::vec::Vec">Vec</a>&lt;T&gt;</code><a href='#impl-Extend%3CT%3E-3' class='anchor'></a><a class='srclink' href='../../src/alloc/vec.rs.html#1787-1792' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-21' class="method hidden"><code id='extend.v-22'>fn <a href='#method.extend-21' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iter: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = T&gt;,&nbsp;</span></code><a class='srclink' href='../../src/alloc/vec.rs.html#1789-1791' title='goto source code'>[src]</a></h4></div><h3 id='impl-Extend%3CT%3E-4' class='impl'><code class='in-band'>impl&lt;T, S&gt; Extend&lt;T&gt; for <a class="struct" href="../../std/collections/struct.HashSet.html" title="struct std::collections::HashSet">HashSet</a>&lt;T, S&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/cmp/trait.Eq.html" title="trait std::cmp::Eq">Eq</a> + <a class="trait" href="../../std/hash/trait.Hash.html" title="trait std::hash::Hash">Hash</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../std/hash/trait.BuildHasher.html" title="trait std::hash::BuildHasher">BuildHasher</a>,&nbsp;</span></code><a href='#impl-Extend%3CT%3E-4' class='anchor'></a><a class='srclink' href='../../src/std/collections/hash/set.rs.html#826-833' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend-22' class="method hidden"><code id='extend.v-23'>fn <a href='#method.extend-22' class='fnname'>extend</a>&lt;I:&nbsp;<a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = T&gt;&gt;(&amp;mut self, iter: I)</code><a class='srclink' href='../../src/std/collections/hash/set.rs.html#830-832' title='goto source code'>[src]</a></h4></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
                         src="../../implementors/core/iter/traits/collect/trait.Extend.js">
                 </script></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 = "std";</script><script src="../../aliases.js"></script><script src="../../main1.35.0.js"></script><script defer src="../../search-index.js"></script></body></html>