Update documentation for Juniper

This commit is contained in:
Juniper Documentation Builder 2016-10-09 12:40:00 +00:00
parent 027dc16ae9
commit cb596a6b6b
316 changed files with 3356 additions and 2181 deletions

View file

@ -48,7 +48,7 @@
[<span class='inner'>&#x2212;</span>] [<span class='inner'>&#x2212;</span>]
</a> </a>
</span><a id='src-634' class='srclink' href='../../src/hyper/client/mod.rs.html#88-90' title='goto source code'>[src]</a></span></h1> </span><a id='src-634' class='srclink' href='../../src/hyper/client/mod.rs.html#88-90' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct ProxyConfig&lt;H,&nbsp;S&gt; <span class='where'>where H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/collections/borrow/enum.Cow.html' title='collections::borrow::Cow'>Cow</a>&lt;'static,&nbsp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;, S: <a class='trait' href='../../hyper/net/trait.SslClient.html' title='hyper::net::SslClient'>SslClient</a>&lt;<a class='struct' href='../../hyper/net/struct.HttpConnector.html' title='hyper::net::HttpConnector'>HttpConnector</a>::Stream&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a> + 'static</span>(pub H, pub <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>, pub S);</pre><div class='docblock'><p>Proxy server configuration with a custom TLS wrapper.</p> <pre class='rust struct'>pub struct ProxyConfig&lt;H,&nbsp;S&gt;(pub H, pub <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>, pub S) <span class='where'>where H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/collections/borrow/enum.Cow.html' title='collections::borrow::Cow'>Cow</a>&lt;'static,&nbsp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;, S: <a class='trait' href='../../hyper/net/trait.SslClient.html' title='hyper::net::SslClient'>SslClient</a>&lt;<a class='struct' href='../../hyper/net/struct.HttpConnector.html' title='hyper::net::HttpConnector'>HttpConnector</a>::Stream&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a> + 'static</span>;</pre><div class='docblock'><p>Proxy server configuration with a custom TLS wrapper.</p>
</div></section> </div></section>
<section id='search' class="content hidden"></section> <section id='search' class="content hidden"></section>

View file

@ -82,7 +82,7 @@
<div class='impl-items'><h4 id='method.description' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description' class='fnname'>description</a>(&amp;self) -&gt; &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4> <div class='impl-items'><h4 id='method.description' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description' class='fnname'>description</a>(&amp;self) -&gt; &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
<div class='docblock'><p>A short description of the error. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description">Read more</a></p> <div class='docblock'><p>A short description of the error. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description">Read more</a></p>
</div><h4 id='method.cause' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause' class='fnname'>cause</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>StdError</a>&gt;</code></h4> </div><h4 id='method.cause' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause' class='fnname'>cause</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>StdError</a>&gt;</code></h4>
<div class='docblock'><p>The lower-level cause of this error, if any.</p> <div class='docblock'><p>The lower-level cause of this error, if any. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause">Read more</a></p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>IoError</a>&gt; for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-978' class='srclink' href='../../src/hyper/error.rs.html#109-113' title='goto source code'>[src]</a></span></h3> </div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>IoError</a>&gt; for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-978' class='srclink' href='../../src/hyper/error.rs.html#109-113' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(err: <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>IoError</a>) -&gt; <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></h4> <div class='impl-items'><h4 id='method.from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(err: <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>IoError</a>) -&gt; <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></h4>
<div class='docblock'><p>Performs the conversion.</p> <div class='docblock'><p>Performs the conversion.</p>

View file

@ -66,7 +66,7 @@
</div></div><h3 class='impl'><span class='in-band'><code>impl&lt;S:&nbsp;<a class='trait' href='../../hyper/net/trait.SslClient.html' title='hyper::net::SslClient'>SslClient</a>,&nbsp;C:&nbsp;<a class='trait' href='../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>NetworkConnector</a>&lt;Stream=<a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>&gt;&gt; <a class='trait' href='../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>NetworkConnector</a> for <a class='struct' href='../../hyper/net/struct.HttpsConnector.html' title='hyper::net::HttpsConnector'>HttpsConnector</a>&lt;S,&nbsp;C&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a id='src-7087' class='srclink' href='../../src/hyper/net.rs.html#591-603' title='goto source code'>[src]</a></span></h3> </div></div><h3 class='impl'><span class='in-band'><code>impl&lt;S:&nbsp;<a class='trait' href='../../hyper/net/trait.SslClient.html' title='hyper::net::SslClient'>SslClient</a>,&nbsp;C:&nbsp;<a class='trait' href='../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>NetworkConnector</a>&lt;Stream=<a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>&gt;&gt; <a class='trait' href='../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>NetworkConnector</a> for <a class='struct' href='../../hyper/net/struct.HttpsConnector.html' title='hyper::net::HttpsConnector'>HttpsConnector</a>&lt;S,&nbsp;C&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a id='src-7087' class='srclink' href='../../src/hyper/net.rs.html#591-603' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Stream' class='type'><code>type <a href='../../hyper/net/trait.NetworkConnector.html#associatedtype.Stream' class='type'>Stream</a> = <a class='enum' href='../../hyper/net/enum.HttpsStream.html' title='hyper::net::HttpsStream'>HttpsStream</a>&lt;S::Stream&gt;</code></h4> <div class='impl-items'><h4 id='associatedtype.Stream' class='type'><code>type <a href='../../hyper/net/trait.NetworkConnector.html#associatedtype.Stream' class='type'>Stream</a> = <a class='enum' href='../../hyper/net/enum.HttpsStream.html' title='hyper::net::HttpsStream'>HttpsStream</a>&lt;S::Stream&gt;</code></h4>
<div class='docblock'><p>Type of <code>Stream</code> to create</p> <div class='docblock'><p>Type of <code>Stream</code> to create</p>
</div><h4 id='method.connect' class='method'><code>fn <a href='../../hyper/net/trait.NetworkConnector.html#tymethod.connect' class='fnname'>connect</a>(&amp;self, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, port: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>, scheme: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>Stream</a>&gt;</code></h4> </div><h4 id='method.connect' class='method'><code>fn <a href='../../hyper/net/trait.NetworkConnector.html#tymethod.connect' class='fnname'>connect</a>(&amp;self, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, port: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>, scheme: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;</code></h4>
<div class='docblock'><p>Connect to a remote address.</p> <div class='docblock'><p>Connect to a remote address.</p>
</div></div></section> </div></div></section>
<section id='search' class="content hidden"></section> <section id='search' class="content hidden"></section>

View file

@ -81,9 +81,9 @@ and then create `Openssl { context: ctx }</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='../../hyper/net/trait.Ssl.html' title='hyper::net::Ssl'>Ssl</a> for <a class='struct' href='../../hyper/net/struct.Openssl.html' title='hyper::net::Openssl'>Openssl</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-7183' class='srclink' href='../../src/hyper/net.rs.html#720-738' title='goto source code'>[src]</a></span></h3> </div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='../../hyper/net/trait.Ssl.html' title='hyper::net::Ssl'>Ssl</a> for <a class='struct' href='../../hyper/net/struct.Openssl.html' title='hyper::net::Openssl'>Openssl</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-7183' class='srclink' href='../../src/hyper/net.rs.html#720-738' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Stream' class='type'><code>type <a href='../../hyper/net/trait.Ssl.html#associatedtype.Stream' class='type'>Stream</a> = <a class='struct' href='../../openssl/ssl/struct.SslStream.html' title='openssl::ssl::SslStream'>SslStream</a>&lt;<a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>&gt;</code></h4> <div class='impl-items'><h4 id='associatedtype.Stream' class='type'><code>type <a href='../../hyper/net/trait.Ssl.html#associatedtype.Stream' class='type'>Stream</a> = <a class='struct' href='../../openssl/ssl/struct.SslStream.html' title='openssl::ssl::SslStream'>SslStream</a>&lt;<a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>&gt;</code></h4>
<div class='docblock'><p>The protected stream.</p> <div class='docblock'><p>The protected stream.</p>
</div><h4 id='method.wrap_client' class='method'><code>fn <a href='../../hyper/net/trait.Ssl.html#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.Ssl.html' title='hyper::net::Ssl'>Stream</a>&gt;</code></h4> </div><h4 id='method.wrap_client' class='method'><code>fn <a href='../../hyper/net/trait.Ssl.html#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;</code></h4>
<div class='docblock'><p>Wrap a client stream with SSL.</p> <div class='docblock'><p>Wrap a client stream with SSL.</p>
</div><h4 id='method.wrap_server' class='method'><code>fn <a href='../../hyper/net/trait.Ssl.html#tymethod.wrap_server' class='fnname'>wrap_server</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.Ssl.html' title='hyper::net::Ssl'>Stream</a>&gt;</code></h4> </div><h4 id='method.wrap_server' class='method'><code>fn <a href='../../hyper/net/trait.Ssl.html#tymethod.wrap_server' class='fnname'>wrap_server</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;</code></h4>
<div class='docblock'><p>Wrap a server stream with SSL.</p> <div class='docblock'><p>Wrap a server stream with SSL.</p>
</div></div></section> </div></div></section>
<section id='search' class="content hidden"></section> <section id='search' class="content hidden"></section>

View file

@ -66,7 +66,7 @@
</div></div><h3 class='impl'><span class='in-band'><code>impl&lt;T:&nbsp;<a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>&gt; <a class='trait' href='../../hyper/net/trait.SslClient.html' title='hyper::net::SslClient'>SslClient</a>&lt;T&gt; for <a class='struct' href='../../hyper/net/struct.OpensslClient.html' title='hyper::net::OpensslClient'>OpensslClient</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-7145' class='srclink' href='../../src/hyper/net.rs.html#674-693' title='goto source code'>[src]</a></span></h3> </div></div><h3 class='impl'><span class='in-band'><code>impl&lt;T:&nbsp;<a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>&gt; <a class='trait' href='../../hyper/net/trait.SslClient.html' title='hyper::net::SslClient'>SslClient</a>&lt;T&gt; for <a class='struct' href='../../hyper/net/struct.OpensslClient.html' title='hyper::net::OpensslClient'>OpensslClient</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-7145' class='srclink' href='../../src/hyper/net.rs.html#674-693' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Stream' class='type'><code>type <a href='../../hyper/net/trait.SslClient.html#associatedtype.Stream' class='type'>Stream</a> = <a class='struct' href='../../openssl/ssl/struct.SslStream.html' title='openssl::ssl::SslStream'>SslStream</a>&lt;T&gt;</code></h4> <div class='impl-items'><h4 id='associatedtype.Stream' class='type'><code>type <a href='../../hyper/net/trait.SslClient.html#associatedtype.Stream' class='type'>Stream</a> = <a class='struct' href='../../openssl/ssl/struct.SslStream.html' title='openssl::ssl::SslStream'>SslStream</a>&lt;T&gt;</code></h4>
<div class='docblock'><p>The protected stream.</p> <div class='docblock'><p>The protected stream.</p>
</div><h4 id='method.wrap_client' class='method'><code>fn <a href='../../hyper/net/trait.SslClient.html#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: T, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.SslClient.html' title='hyper::net::SslClient'>Stream</a>&gt;</code></h4> </div><h4 id='method.wrap_client' class='method'><code>fn <a href='../../hyper/net/trait.SslClient.html#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: T, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;</code></h4>
<div class='docblock'><p>Wrap a client stream with SSL.</p> <div class='docblock'><p>Wrap a client stream with SSL.</p>
</div></div></section> </div></div></section>
<section id='search' class="content hidden"></section> <section id='search' class="content hidden"></section>

View file

@ -50,7 +50,7 @@
</span><a id='src-6765' class='srclink' href='../../src/hyper/net.rs.html#81-87' title='goto source code'>[src]</a></span></h1> </span><a id='src-6765' class='srclink' href='../../src/hyper/net.rs.html#81-87' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait NetworkConnector { <pre class='rust trait'>pub trait NetworkConnector {
type <a href='#associatedtype.Stream' class='type'>Stream</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;<a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a>&gt;&gt;; type <a href='#associatedtype.Stream' class='type'>Stream</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;<a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a>&gt;&gt;;
fn <a href='#tymethod.connect' class='fnname'>connect</a>(&amp;self, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, port: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>, scheme: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>Stream</a>&gt;; fn <a href='#tymethod.connect' class='fnname'>connect</a>(&amp;self, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, port: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>, scheme: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;;
}</pre><div class='docblock'><p>A connector creates a NetworkStream.</p> }</pre><div class='docblock'><p>A connector creates a NetworkStream.</p>
</div> </div>
<h2 id='associated-types'>Associated Types</h2> <h2 id='associated-types'>Associated Types</h2>
@ -59,7 +59,7 @@
</div></div> </div></div>
<h2 id='required-methods'>Required Methods</h2> <h2 id='required-methods'>Required Methods</h2>
<div class='methods'> <div class='methods'>
<h3 id='tymethod.connect' class='method stab '><code>fn <a href='#tymethod.connect' class='fnname'>connect</a>(&amp;self, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, port: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>, scheme: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>Stream</a>&gt;</code></h3><div class='docblock'><p>Connect to a remote address.</p> <h3 id='tymethod.connect' class='method stab '><code>fn <a href='#tymethod.connect' class='fnname'>connect</a>(&amp;self, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, port: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>, scheme: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;</code></h3><div class='docblock'><p>Connect to a remote address.</p>
</div></div> </div></div>
<h2 id='implementors'>Implementors</h2> <h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'> <ul class='item-list' id='implementors-list'>

View file

@ -50,7 +50,7 @@
</span><a id='src-6729' class='srclink' href='../../src/hyper/net.rs.html#26-40' title='goto source code'>[src]</a></span></h1> </span><a id='src-6729' class='srclink' href='../../src/hyper/net.rs.html#26-40' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait NetworkListener: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> { <pre class='rust trait'>pub trait NetworkListener: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> {
type <a href='#associatedtype.Stream' class='type'>Stream</a>: <a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>; type <a href='#associatedtype.Stream' class='type'>Stream</a>: <a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>;
fn <a href='#tymethod.accept' class='fnname'>accept</a>(&amp;mut self) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.NetworkListener.html' title='hyper::net::NetworkListener'>Stream</a>&gt;; fn <a href='#tymethod.accept' class='fnname'>accept</a>(&amp;mut self) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;;
fn <a href='#tymethod.local_addr' class='fnname'>local_addr</a>(&amp;mut self) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/std/net/addr/enum.SocketAddr.html' title='std::net::addr::SocketAddr'>SocketAddr</a>&gt;; fn <a href='#tymethod.local_addr' class='fnname'>local_addr</a>(&amp;mut self) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/std/net/addr/enum.SocketAddr.html' title='std::net::addr::SocketAddr'>SocketAddr</a>&gt;;
fn <a href='#method.incoming' class='fnname'>incoming</a>(&amp;mut self) -&gt; <a class='struct' href='../../hyper/net/struct.NetworkConnections.html' title='hyper::net::NetworkConnections'>NetworkConnections</a>&lt;Self&gt; { ... } fn <a href='#method.incoming' class='fnname'>incoming</a>(&amp;mut self) -&gt; <a class='struct' href='../../hyper/net/struct.NetworkConnections.html' title='hyper::net::NetworkConnections'>NetworkConnections</a>&lt;Self&gt; { ... }
@ -62,7 +62,7 @@
</div></div> </div></div>
<h2 id='required-methods'>Required Methods</h2> <h2 id='required-methods'>Required Methods</h2>
<div class='methods'> <div class='methods'>
<h3 id='tymethod.accept' class='method stab '><code>fn <a href='#tymethod.accept' class='fnname'>accept</a>(&amp;mut self) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.NetworkListener.html' title='hyper::net::NetworkListener'>Stream</a>&gt;</code></h3><div class='docblock'><p>Returns an iterator of streams.</p> <h3 id='tymethod.accept' class='method stab '><code>fn <a href='#tymethod.accept' class='fnname'>accept</a>(&amp;mut self) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;</code></h3><div class='docblock'><p>Returns an iterator of streams.</p>
</div><h3 id='tymethod.local_addr' class='method stab '><code>fn <a href='#tymethod.local_addr' class='fnname'>local_addr</a>(&amp;mut self) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/std/net/addr/enum.SocketAddr.html' title='std::net::addr::SocketAddr'>SocketAddr</a>&gt;</code></h3><div class='docblock'><p>Get the address this Listener ended up listening on.</p> </div><h3 id='tymethod.local_addr' class='method stab '><code>fn <a href='#tymethod.local_addr' class='fnname'>local_addr</a>(&amp;mut self) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/std/net/addr/enum.SocketAddr.html' title='std::net::addr::SocketAddr'>SocketAddr</a>&gt;</code></h3><div class='docblock'><p>Get the address this Listener ended up listening on.</p>
</div></div> </div></div>
<h2 id='provided-methods'>Provided Methods</h2> <h2 id='provided-methods'>Provided Methods</h2>

View file

@ -50,8 +50,8 @@
</span><a id='src-6934' class='srclink' href='../../src/hyper/net.rs.html#419-426' title='goto source code'>[src]</a></span></h1> </span><a id='src-6934' class='srclink' href='../../src/hyper/net.rs.html#419-426' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait Ssl { <pre class='rust trait'>pub trait Ssl {
type <a href='#associatedtype.Stream' class='type'>Stream</a>: <a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>; type <a href='#associatedtype.Stream' class='type'>Stream</a>: <a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>;
fn <a href='#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.Ssl.html' title='hyper::net::Ssl'>Stream</a>&gt;; fn <a href='#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;;
fn <a href='#tymethod.wrap_server' class='fnname'>wrap_server</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.Ssl.html' title='hyper::net::Ssl'>Stream</a>&gt;; fn <a href='#tymethod.wrap_server' class='fnname'>wrap_server</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;;
}</pre><div class='docblock'><p>Deprecated</p> }</pre><div class='docblock'><p>Deprecated</p>
<p>Use <code>SslClient</code> and <code>SslServer</code> instead.</p> <p>Use <code>SslClient</code> and <code>SslServer</code> instead.</p>
@ -62,8 +62,8 @@
</div></div> </div></div>
<h2 id='required-methods'>Required Methods</h2> <h2 id='required-methods'>Required Methods</h2>
<div class='methods'> <div class='methods'>
<h3 id='tymethod.wrap_client' class='method stab '><code>fn <a href='#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.Ssl.html' title='hyper::net::Ssl'>Stream</a>&gt;</code></h3><div class='docblock'><p>Wrap a client stream with SSL.</p> <h3 id='tymethod.wrap_client' class='method stab '><code>fn <a href='#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;</code></h3><div class='docblock'><p>Wrap a client stream with SSL.</p>
</div><h3 id='tymethod.wrap_server' class='method stab '><code>fn <a href='#tymethod.wrap_server' class='fnname'>wrap_server</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.Ssl.html' title='hyper::net::Ssl'>Stream</a>&gt;</code></h3><div class='docblock'><p>Wrap a server stream with SSL.</p> </div><h3 id='tymethod.wrap_server' class='method stab '><code>fn <a href='#tymethod.wrap_server' class='fnname'>wrap_server</a>(&amp;self, stream: <a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;</code></h3><div class='docblock'><p>Wrap a server stream with SSL.</p>
</div></div> </div></div>
<h2 id='implementors'>Implementors</h2> <h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'> <ul class='item-list' id='implementors-list'>

View file

@ -50,7 +50,7 @@
</span><a id='src-6943' class='srclink' href='../../src/hyper/net.rs.html#429-434' title='goto source code'>[src]</a></span></h1> </span><a id='src-6943' class='srclink' href='../../src/hyper/net.rs.html#429-434' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait SslClient&lt;T:&nbsp;<a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>&nbsp;=&nbsp;<a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>&gt; { <pre class='rust trait'>pub trait SslClient&lt;T:&nbsp;<a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>&nbsp;=&nbsp;<a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>&gt; {
type <a href='#associatedtype.Stream' class='type'>Stream</a>: <a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>; type <a href='#associatedtype.Stream' class='type'>Stream</a>: <a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>;
fn <a href='#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: T, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.SslClient.html' title='hyper::net::SslClient'>Stream</a>&gt;; fn <a href='#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: T, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;;
}</pre><div class='docblock'><p>An abstraction to allow any SSL implementation to be used with client-side HttpsStreams.</p> }</pre><div class='docblock'><p>An abstraction to allow any SSL implementation to be used with client-side HttpsStreams.</p>
</div> </div>
<h2 id='associated-types'>Associated Types</h2> <h2 id='associated-types'>Associated Types</h2>
@ -59,7 +59,7 @@
</div></div> </div></div>
<h2 id='required-methods'>Required Methods</h2> <h2 id='required-methods'>Required Methods</h2>
<div class='methods'> <div class='methods'>
<h3 id='tymethod.wrap_client' class='method stab '><code>fn <a href='#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: T, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.SslClient.html' title='hyper::net::SslClient'>Stream</a>&gt;</code></h3><div class='docblock'><p>Wrap a client stream with SSL.</p> <h3 id='tymethod.wrap_client' class='method stab '><code>fn <a href='#tymethod.wrap_client' class='fnname'>wrap_client</a>(&amp;self, stream: T, host: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;</code></h3><div class='docblock'><p>Wrap a client stream with SSL.</p>
</div></div> </div></div>
<h2 id='implementors'>Implementors</h2> <h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'> <ul class='item-list' id='implementors-list'>

View file

@ -50,7 +50,7 @@
</span><a id='src-6950' class='srclink' href='../../src/hyper/net.rs.html#437-442' title='goto source code'>[src]</a></span></h1> </span><a id='src-6950' class='srclink' href='../../src/hyper/net.rs.html#437-442' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait SslServer&lt;T:&nbsp;<a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>&nbsp;=&nbsp;<a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>&gt; { <pre class='rust trait'>pub trait SslServer&lt;T:&nbsp;<a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>&nbsp;=&nbsp;<a class='struct' href='../../hyper/net/struct.HttpStream.html' title='hyper::net::HttpStream'>HttpStream</a>&gt; {
type <a href='#associatedtype.Stream' class='type'>Stream</a>: <a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>; type <a href='#associatedtype.Stream' class='type'>Stream</a>: <a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>;
fn <a href='#tymethod.wrap_server' class='fnname'>wrap_server</a>(&amp;self, stream: T) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.SslServer.html' title='hyper::net::SslServer'>Stream</a>&gt;; fn <a href='#tymethod.wrap_server' class='fnname'>wrap_server</a>(&amp;self, stream: T) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;;
}</pre><div class='docblock'><p>An abstraction to allow any SSL implementation to be used with server-side HttpsStreams.</p> }</pre><div class='docblock'><p>An abstraction to allow any SSL implementation to be used with server-side HttpsStreams.</p>
</div> </div>
<h2 id='associated-types'>Associated Types</h2> <h2 id='associated-types'>Associated Types</h2>
@ -59,7 +59,7 @@
</div></div> </div></div>
<h2 id='required-methods'>Required Methods</h2> <h2 id='required-methods'>Required Methods</h2>
<div class='methods'> <div class='methods'>
<h3 id='tymethod.wrap_server' class='method stab '><code>fn <a href='#tymethod.wrap_server' class='fnname'>wrap_server</a>(&amp;self, stream: T) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::<a class='trait' href='../../hyper/net/trait.SslServer.html' title='hyper::net::SslServer'>Stream</a>&gt;</code></h3><div class='docblock'><p>Wrap a server stream with SSL.</p> <h3 id='tymethod.wrap_server' class='method stab '><code>fn <a href='#tymethod.wrap_server' class='fnname'>wrap_server</a>(&amp;self, stream: T) -&gt; <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a>&lt;Self::Stream&gt;</code></h3><div class='docblock'><p>Wrap a server stream with SSL.</p>
</div></div> </div></div>
<h2 id='implementors'>Implementors</h2> <h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'> <ul class='item-list' id='implementors-list'>

View file

@ -69,7 +69,7 @@
</div><h4 id='method.origin' class='method'><code>fn <a href='#method.origin' class='fnname'>origin</a>(&amp;self) -&gt; <a class='enum' href='../url/origin/enum.Origin.html' title='url::origin::Origin'>Origin</a></code></h4> </div><h4 id='method.origin' class='method'><code>fn <a href='#method.origin' class='fnname'>origin</a>(&amp;self) -&gt; <a class='enum' href='../url/origin/enum.Origin.html' title='url::origin::Origin'>Origin</a></code></h4>
<div class='docblock'><p>Return the origin of this URL (<a href="https://url.spec.whatwg.org/#origin">https://url.spec.whatwg.org/#origin</a>)</p> <div class='docblock'><p>Return the origin of this URL (<a href="https://url.spec.whatwg.org/#origin">https://url.spec.whatwg.org/#origin</a>)</p>
<p>Note: this return an opaque origin for <code>file:</code> URLs, which causes <p>Note: this returns an opaque origin for <code>file:</code> URLs, which causes
<code>url.origin() != url.origin()</code>.</p> <code>url.origin() != url.origin()</code>.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1> <h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
@ -115,6 +115,13 @@
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>url</span>.<span class='ident'>origin</span>().<span class='ident'>is_tuple</span>());</pre> <span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>url</span>.<span class='ident'>origin</span>().<span class='ident'>is_tuple</span>());</pre>
</div><h4 id='method.scheme' class='method'><code>fn <a href='#method.scheme' class='fnname'>scheme</a>(&amp;self) -&gt; &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4> </div><h4 id='method.scheme' class='method'><code>fn <a href='#method.scheme' class='fnname'>scheme</a>(&amp;self) -&gt; &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
<div class='docblock'><p>Return the scheme of this URL, lower-cased, as an ASCII string without the &#39;:&#39; delimiter.</p> <div class='docblock'><p>Return the scheme of this URL, lower-cased, as an ASCII string without the &#39;:&#39; delimiter.</p>
<h1 id='examples-1' class='section-header'><a href='#examples-1'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>url</span>::<span class='ident'>Url</span>;
<span class='kw'>let</span> <span class='ident'>url</span> <span class='op'>=</span> <span class='ident'>Url</span>::<span class='ident'>parse</span>(<span class='string'>&quot;file:///tmp/foo&quot;</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>url</span>.<span class='ident'>scheme</span>(), <span class='string'>&quot;file&quot;</span>);</pre>
</div><h4 id='method.has_authority' class='method'><code>fn <a href='#method.has_authority' class='fnname'>has_authority</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4> </div><h4 id='method.has_authority' class='method'><code>fn <a href='#method.has_authority' class='fnname'>has_authority</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Return whether the URL has an &#39;authority&#39;, <div class='docblock'><p>Return whether the URL has an &#39;authority&#39;,
which can contain a username, password, host, and port number.</p> which can contain a username, password, host, and port number.</p>
@ -131,17 +138,36 @@ as is typically the case of <code>data:</code> and <code>mailto:</code> URLs.</p
<div class='docblock'><p>Return the username for this URL (typically the empty string) <div class='docblock'><p>Return the username for this URL (typically the empty string)
as a percent-encoded ASCII string.</p> as a percent-encoded ASCII string.</p>
<h1 id='examples-1' class='section-header'><a href='#examples-1'>Examples</a></h1> <h1 id='examples-2' class='section-header'><a href='#examples-2'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>url</span>::<span class='ident'>Url</span>; <span class='kw'>use</span> <span class='ident'>url</span>::<span class='ident'>Url</span>;
<span class='kw'>let</span> <span class='ident'>url</span> <span class='op'>=</span> <span class='ident'>Url</span>::<span class='ident'>parse</span>(<span class='string'>&quot;ftp://rms@example.com&quot;</span>).<span class='ident'>unwrap</span>(); <span class='kw'>let</span> <span class='ident'>url</span> <span class='op'>=</span> <span class='ident'>Url</span>::<span class='ident'>parse</span>(<span class='string'>&quot;ftp://rms@example.com&quot;</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>url</span>.<span class='ident'>username</span>(), <span class='string'>&quot;rms&quot;</span>); <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>url</span>.<span class='ident'>username</span>(), <span class='string'>&quot;rms&quot;</span>);
<span class='kw'>let</span> <span class='ident'>url</span> <span class='op'>=</span> <span class='ident'>Url</span>::<span class='ident'>parse</span>(<span class='string'>&quot;ftp://:secret123@example.com&quot;</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>url</span>.<span class='ident'>username</span>(), <span class='string'>&quot;&quot;</span>);
<span class='kw'>let</span> <span class='ident'>url</span> <span class='op'>=</span> <span class='ident'>Url</span>::<span class='ident'>parse</span>(<span class='string'>&quot;https://example.com&quot;</span>).<span class='ident'>unwrap</span>(); <span class='kw'>let</span> <span class='ident'>url</span> <span class='op'>=</span> <span class='ident'>Url</span>::<span class='ident'>parse</span>(<span class='string'>&quot;https://example.com&quot;</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>url</span>.<span class='ident'>username</span>(), <span class='string'>&quot;&quot;</span>);</pre> <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>url</span>.<span class='ident'>username</span>(), <span class='string'>&quot;&quot;</span>);</pre>
</div><h4 id='method.password' class='method'><code>fn <a href='#method.password' class='fnname'>password</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;</code></h4> </div><h4 id='method.password' class='method'><code>fn <a href='#method.password' class='fnname'>password</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;</code></h4>
<div class='docblock'><p>Return the password for this URL, if any, as a percent-encoded ASCII string.</p> <div class='docblock'><p>Return the password for this URL, if any, as a percent-encoded ASCII string.</p>
<h1 id='examples-3' class='section-header'><a href='#examples-3'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>url</span>::<span class='ident'>Url</span>;
<span class='kw'>let</span> <span class='ident'>url</span> <span class='op'>=</span> <span class='ident'>Url</span>::<span class='ident'>parse</span>(<span class='string'>&quot;ftp://rms:secret123@example.com&quot;</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>url</span>.<span class='ident'>password</span>(), <span class='prelude-val'>Some</span>(<span class='string'>&quot;secret123&quot;</span>));
<span class='kw'>let</span> <span class='ident'>url</span> <span class='op'>=</span> <span class='ident'>Url</span>::<span class='ident'>parse</span>(<span class='string'>&quot;ftp://:secret123@example.com&quot;</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>url</span>.<span class='ident'>password</span>(), <span class='prelude-val'>Some</span>(<span class='string'>&quot;secret123&quot;</span>));
<span class='kw'>let</span> <span class='ident'>url</span> <span class='op'>=</span> <span class='ident'>Url</span>::<span class='ident'>parse</span>(<span class='string'>&quot;ftp://rms@example.com&quot;</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>url</span>.<span class='ident'>password</span>(), <span class='prelude-val'>None</span>);
<span class='kw'>let</span> <span class='ident'>url</span> <span class='op'>=</span> <span class='ident'>Url</span>::<span class='ident'>parse</span>(<span class='string'>&quot;https://example.com&quot;</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>url</span>.<span class='ident'>password</span>(), <span class='prelude-val'>None</span>);</pre>
</div><h4 id='method.has_host' class='method'><code>fn <a href='#method.has_host' class='fnname'>has_host</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4> </div><h4 id='method.has_host' class='method'><code>fn <a href='#method.has_host' class='fnname'>has_host</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Equivalent to <code>url.host().is_some()</code>.</p> <div class='docblock'><p>Equivalent to <code>url.host().is_some()</code>.</p>
</div><h4 id='method.host_str' class='method'><code>fn <a href='#method.host_str' class='fnname'>host_str</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;</code></h4> </div><h4 id='method.host_str' class='method'><code>fn <a href='#method.host_str' class='fnname'>host_str</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;</code></h4>

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html' title='core::borrow::BorrowMut'>BorrowMut</a>&lt;T&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html' title='core::borrow::BorrowMut'>BorrowMut</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a>T<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html' title='core::borrow::BorrowMut'>BorrowMut</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a>T<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html' title='core::borrow::BorrowMut'>BorrowMut</a>&lt;T&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",]; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html' title='core::borrow::BorrowMut'>BorrowMut</a>&lt;T&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html' title='core::borrow::BorrowMut'>BorrowMut</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a>T<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html' title='core::borrow::BorrowMut'>BorrowMut</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a>T<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html' title='core::borrow::BorrowMut'>BorrowMut</a>&lt;T&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;T&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a>T<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a>T<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;T&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",]; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a>T<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;T&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a>T<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html' title='core::convert::AsMut'>AsMut</a>&lt;T&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html' title='core::fmt::Pointer'>Pointer</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html' title='alloc::rc::Rc'>Rc</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html' title='core::fmt::Pointer'>Pointer</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html' title='core::fmt::Pointer'>Pointer</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",]; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html' title='core::fmt::Pointer'>Pointer</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html' title='alloc::rc::Rc'>Rc</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>","impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html' title='core::fmt::Pointer'>Pointer</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html' title='core::fmt::Pointer'>Pointer</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html' title='core::fmt::Write'>Write</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",];implementors["hyper"] = [];implementors["iron"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html' title='core::fmt::Write'>Write</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",]; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html' title='core::fmt::Write'>Write</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",];implementors["hyper"] = [];implementors["iron"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Write.html' title='core::fmt::Write'>Write</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html' title='core::hash::BuildHasher'>BuildHasher</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.RandomState.html' title='std::collections::hash::map::RandomState'>RandomState</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html' title='core::hash::BuildHasher'>BuildHasher</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.RandomState.html' title='std::collections::hash::map::RandomState'>RandomState</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.DefaultHasher.html' title='std::collections::hash::map::DefaultHasher'>DefaultHasher</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a> for <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.DefaultHasher.html' title='std::collections::hash::map::DefaultHasher'>DefaultHasher</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["time"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a> for <a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>&gt; for <a class='struct' href='time/struct.Timespec.html' title='time::Timespec'>Timespec</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>&gt; for <a class='struct' href='time/struct.SteadyTime.html' title='time::SteadyTime'>SteadyTime</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>&gt; for <a class='struct' href='time/struct.Tm.html' title='time::Tm'>Tm</a>",];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;&amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.Instant.html' title='std::time::Instant'>Instant</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html' title='std::time::SystemTime'>SystemTime</a>","impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;&amp;'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;&amp;'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",]; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;&amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.Instant.html' title='std::time::Instant'>Instant</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html' title='std::time::SystemTime'>SystemTime</a>","impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;&amp;'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",];implementors["time"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a> for <a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>&gt; for <a class='struct' href='time/struct.Timespec.html' title='time::Timespec'>Timespec</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>&gt; for <a class='struct' href='time/struct.SteadyTime.html' title='time::SteadyTime'>SteadyTime</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>&gt; for <a class='struct' href='time/struct.Tm.html' title='time::Tm'>Tm</a>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;&amp;'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.Instant.html' title='std::time::Instant'>Instant</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html' title='std::time::SystemTime'>SystemTime</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.Instant.html' title='std::time::Instant'>Instant</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html' title='std::time::SystemTime'>SystemTime</a>","impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;&amp;'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;&amp;'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>","impl&lt;'a,&nbsp;'b,&nbsp;T,&nbsp;S&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt; <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html' title='core::hash::BuildHasher'>BuildHasher</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a>, T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;'a,&nbsp;'b,&nbsp;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>","impl&lt;E&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt; <span class='where'>where E: <a class='trait' href='https://doc.rust-lang.org/nightly/collections/enum_set/trait.CLike.html' title='collections::enum_set::CLike'>CLike</a></span>",]; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>","impl&lt;'a,&nbsp;'b,&nbsp;T,&nbsp;S&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt; <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html' title='core::hash::BuildHasher'>BuildHasher</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a>, T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;'a,&nbsp;'b,&nbsp;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>","impl&lt;E&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt; <span class='where'>where E: <a class='trait' href='https://doc.rust-lang.org/nightly/collections/enum_set/trait.CLike.html' title='collections::enum_set::CLike'>CLike</a></span>",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAndAssign.html' title='core::ops::BitAndAssign'>BitAndAssign</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAndAssign.html' title='core::ops::BitAndAssign'>BitAndAssign</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAndAssign.html' title='core::ops::BitAndAssign'>BitAndAssign</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAndAssign.html' title='core::ops::BitAndAssign'>BitAndAssign</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>","impl&lt;'a,&nbsp;'b,&nbsp;T,&nbsp;S&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt; <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html' title='core::hash::BuildHasher'>BuildHasher</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a>, T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;'a,&nbsp;'b,&nbsp;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>","impl&lt;E&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt; <span class='where'>where E: <a class='trait' href='https://doc.rust-lang.org/nightly/collections/enum_set/trait.CLike.html' title='collections::enum_set::CLike'>CLike</a></span>",]; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>","impl&lt;'a,&nbsp;'b,&nbsp;T,&nbsp;S&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt; <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html' title='core::hash::BuildHasher'>BuildHasher</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a>, T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;'a,&nbsp;'b,&nbsp;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>","impl&lt;E&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt; <span class='where'>where E: <a class='trait' href='https://doc.rust-lang.org/nightly/collections/enum_set/trait.CLike.html' title='collections::enum_set::CLike'>CLike</a></span>",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOrAssign.html' title='core::ops::BitOrAssign'>BitOrAssign</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOrAssign.html' title='core::ops::BitOrAssign'>BitOrAssign</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOrAssign.html' title='core::ops::BitOrAssign'>BitOrAssign</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOrAssign.html' title='core::ops::BitOrAssign'>BitOrAssign</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>","impl&lt;'a,&nbsp;'b,&nbsp;T,&nbsp;S&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt; <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html' title='core::hash::BuildHasher'>BuildHasher</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a>, T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;'a,&nbsp;'b,&nbsp;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>","impl&lt;E&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt; <span class='where'>where E: <a class='trait' href='https://doc.rust-lang.org/nightly/collections/enum_set/trait.CLike.html' title='collections::enum_set::CLike'>CLike</a></span>",]; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>","impl&lt;'a,&nbsp;'b,&nbsp;T,&nbsp;S&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html' title='std::collections::hash::set::HashSet'>HashSet</a>&lt;T,&nbsp;S&gt; <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html' title='core::hash::BuildHasher'>BuildHasher</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a>, T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;'a,&nbsp;'b,&nbsp;T&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a>&lt;&amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt;&gt; for &amp;'a <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html' title='collections::btree::set::BTreeSet'>BTreeSet</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span>","impl&lt;E&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/enum_set/struct.EnumSet.html' title='collections::enum_set::EnumSet'>EnumSet</a>&lt;E&gt; <span class='where'>where E: <a class='trait' href='https://doc.rust-lang.org/nightly/collections/enum_set/trait.CLike.html' title='collections::enum_set::CLike'>CLike</a></span>",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXorAssign.html' title='core::ops::BitXorAssign'>BitXorAssign</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXorAssign.html' title='core::ops::BitXorAssign'>BitXorAssign</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXorAssign.html' title='core::ops::BitXorAssign'>BitXorAssign</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXorAssign.html' title='core::ops::BitXorAssign'>BitXorAssign</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl&lt;T,&nbsp;U&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html' title='core::ops::CoerceUnsized'>CoerceUnsized</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html' title='alloc::rc::Rc'>Rc</a>&lt;U&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html' title='alloc::rc::Rc'>Rc</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Unsize.html' title='core::marker::Unsize'>Unsize</a>&lt;U&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>","impl&lt;T,&nbsp;U&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html' title='core::ops::CoerceUnsized'>CoerceUnsized</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/rc/struct.Weak.html' title='alloc::rc::Weak'>Weak</a>&lt;U&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/rc/struct.Weak.html' title='alloc::rc::Weak'>Weak</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Unsize.html' title='core::marker::Unsize'>Unsize</a>&lt;U&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>","impl&lt;T,&nbsp;U&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html' title='core::ops::CoerceUnsized'>CoerceUnsized</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;U&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Unsize.html' title='core::marker::Unsize'>Unsize</a>&lt;U&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;T,&nbsp;U&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html' title='core::ops::CoerceUnsized'>CoerceUnsized</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;U&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Unsize.html' title='core::marker::Unsize'>Unsize</a>&lt;U&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",]; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;T,&nbsp;U&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html' title='core::ops::CoerceUnsized'>CoerceUnsized</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html' title='alloc::rc::Rc'>Rc</a>&lt;U&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html' title='alloc::rc::Rc'>Rc</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Unsize.html' title='core::marker::Unsize'>Unsize</a>&lt;U&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>","impl&lt;T,&nbsp;U&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html' title='core::ops::CoerceUnsized'>CoerceUnsized</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/rc/struct.Weak.html' title='alloc::rc::Weak'>Weak</a>&lt;U&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/rc/struct.Weak.html' title='alloc::rc::Weak'>Weak</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Unsize.html' title='core::marker::Unsize'>Unsize</a>&lt;U&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>","impl&lt;T,&nbsp;U&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html' title='core::ops::CoerceUnsized'>CoerceUnsized</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;U&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Unsize.html' title='core::marker::Unsize'>Unsize</a>&lt;U&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;T,&nbsp;U&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html' title='core::ops::CoerceUnsized'>CoerceUnsized</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;U&gt;&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;T&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Unsize.html' title='core::marker::Unsize'>Unsize</a>&lt;U&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>, U: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span>",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["time"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Div.html' title='core::ops::Div'>Div</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for <a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>",];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Div.html' title='core::ops::Div'>Div</a>&lt;&amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Div.html' title='core::ops::Div'>Div</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Div.html' title='core::ops::Div'>Div</a>&lt;&amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Div.html' title='core::ops::Div'>Div</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>",];implementors["time"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Div.html' title='core::ops::Div'>Div</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for <a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.DivAssign.html' title='core::ops::DivAssign'>DivAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.DivAssign.html' title='core::ops::DivAssign'>DivAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl&lt;R,&nbsp;F&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>() for <a class='struct' href='https://doc.rust-lang.org/nightly/std/panic/struct.AssertUnwindSafe.html' title='std::panic::AssertUnwindSafe'>AssertUnwindSafe</a>&lt;F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>() -&gt; R</span>","impl&lt;'a,&nbsp;A,&nbsp;R&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>&lt;A&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;<a class='trait' href='https://doc.rust-lang.org/nightly/alloc/boxed/trait.FnBox.html' title='alloc::boxed::FnBox'>FnBox</a>&lt;A,&nbsp;Output=R&gt; + 'a&gt;","impl&lt;'a,&nbsp;A,&nbsp;R&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>&lt;A&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;<a class='trait' href='https://doc.rust-lang.org/nightly/alloc/boxed/trait.FnBox.html' title='alloc::boxed::FnBox'>FnBox</a>&lt;A,&nbsp;Output=R&gt; + 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a>&gt;",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;'a,&nbsp;A,&nbsp;R&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>&lt;A&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;<a class='trait' href='https://doc.rust-lang.org/nightly/alloc/boxed/trait.FnBox.html' title='alloc::boxed::FnBox'>FnBox</a>&lt;A,&nbsp;Output=R&gt; + 'a&gt;","impl&lt;'a,&nbsp;A,&nbsp;R&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>&lt;A&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;<a class='trait' href='https://doc.rust-lang.org/nightly/alloc/boxed/trait.FnBox.html' title='alloc::boxed::FnBox'>FnBox</a>&lt;A,&nbsp;Output=R&gt; + 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a>&gt;",]; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;R,&nbsp;F&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>() for <a class='struct' href='https://doc.rust-lang.org/nightly/std/panic/struct.AssertUnwindSafe.html' title='std::panic::AssertUnwindSafe'>AssertUnwindSafe</a>&lt;F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>() -&gt; R</span>","impl&lt;'a,&nbsp;A,&nbsp;R&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>&lt;A&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;<a class='trait' href='https://doc.rust-lang.org/nightly/alloc/boxed/trait.FnBox.html' title='alloc::boxed::FnBox'>FnBox</a>&lt;A,&nbsp;Output=R&gt; + 'a&gt;","impl&lt;'a,&nbsp;A,&nbsp;R&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>&lt;A&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;<a class='trait' href='https://doc.rust-lang.org/nightly/alloc/boxed/trait.FnBox.html' title='alloc::boxed::FnBox'>FnBox</a>&lt;A,&nbsp;Output=R&gt; + 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a>&gt;",];implementors["hyper"] = [];implementors["iron"] = ["impl&lt;'a,&nbsp;A,&nbsp;R&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>&lt;A&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;<a class='trait' href='https://doc.rust-lang.org/nightly/alloc/boxed/trait.FnBox.html' title='alloc::boxed::FnBox'>FnBox</a>&lt;A,&nbsp;Output=R&gt; + 'a&gt;","impl&lt;'a,&nbsp;A,&nbsp;R&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnOnce.html' title='core::ops::FnOnce'>FnOnce</a>&lt;A&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a>&lt;<a class='trait' href='https://doc.rust-lang.org/nightly/alloc/boxed/trait.FnBox.html' title='alloc::boxed::FnBox'>FnBox</a>&lt;A,&nbsp;Output=R&gt; + 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a>&gt;",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["time"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for <a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>",];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;&amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;&amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>",];implementors["time"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for <a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.MulAssign.html' title='core::ops::MulAssign'>MulAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.MulAssign.html' title='core::ops::MulAssign'>MulAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["time"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Neg.html' title='core::ops::Neg'>Neg</a> for <a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>",];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Neg.html' title='core::ops::Neg'>Neg</a> for <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Neg.html' title='core::ops::Neg'>Neg</a> for <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>",];implementors["time"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Neg.html' title='core::ops::Neg'>Neg</a> for <a class='struct' href='time/struct.Duration.html' title='time::Duration'>Duration</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Not.html' title='core::ops::Not'>Not</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Not.html' title='core::ops::Not'>Not</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Not.html' title='core::ops::Not'>Not</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Not.html' title='core::ops::Not'>Not</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Rem.html' title='core::ops::Rem'>Rem</a>&lt;&amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Rem.html' title='core::ops::Rem'>Rem</a>&lt;&amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Shl.html' title='core::ops::Shl'>Shl</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Shl.html' title='core::ops::Shl'>Shl</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Shr.html' title='core::ops::Shr'>Shr</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Shr.html' title='core::ops::Shr'>Shr</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for &amp;'a <a class='struct' href='openssl/bn/struct.BigNum.html' title='openssl::bn::BigNum'>BigNum</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.SubAssign.html' title='core::ops::SubAssign'>SubAssign</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.SubAssign.html' title='core::ops::SubAssign'>SubAssign</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.SubAssign.html' title='core::ops::SubAssign'>SubAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.SubAssign.html' title='core::ops::SubAssign'>SubAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.Instant.html' title='std::time::Instant'>Instant</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.SubAssign.html' title='core::ops::SubAssign'>SubAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html' title='std::time::SystemTime'>SystemTime</a>",];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.SubAssign.html' title='core::ops::SubAssign'>SubAssign</a> for <a class='struct' href='openssl/ssl/struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.SubAssign.html' title='core::ops::SubAssign'>SubAssign</a> for <a class='struct' href='openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.SubAssign.html' title='core::ops::SubAssign'>SubAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.SubAssign.html' title='core::ops::SubAssign'>SubAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.Instant.html' title='std::time::Instant'>Instant</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.SubAssign.html' title='core::ops::SubAssign'>SubAssign</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>&gt; for <a class='struct' href='https://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html' title='std::time::SystemTime'>SystemTime</a>",];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["hyper"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["hyper"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["iron"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["iron"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = ["impl&lt;'a,&nbsp;'b&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt; for &amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",];implementors["iron"] = ["impl&lt;'a,&nbsp;'b&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt; for &amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",]; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = ["impl&lt;'a,&nbsp;'b&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt; for &amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",];implementors["iron"] = ["impl&lt;'a,&nbsp;'b&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt; for &amp;'b <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>",];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["iron"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["iron"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

View file

@ -1,5 +1,5 @@
(function() {var implementors = {}; (function() {var implementors = {};
implementors["libc"] = [];implementors["lazy_static"] = [];implementors["openssl"] = [];implementors["iron"] = []; implementors["lazy_static"] = [];implementors["libc"] = [];implementors["openssl"] = [];implementors["iron"] = [];
if (window.register_implementors) { if (window.register_implementors) {
window.register_implementors(implementors); window.register_implementors(implementors);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -82,7 +82,7 @@
<div class='impl-items'><h4 id='method.description' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description' class='fnname'>description</a>(&amp;self) -&gt; &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4> <div class='impl-items'><h4 id='method.description' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description' class='fnname'>description</a>(&amp;self) -&gt; &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
<div class='docblock'><p>A short description of the error. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description">Read more</a></p> <div class='docblock'><p>A short description of the error. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description">Read more</a></p>
</div><h4 id='method.cause' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause' class='fnname'>cause</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>Error</a>&gt;</code></h4> </div><h4 id='method.cause' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause' class='fnname'>cause</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>Error</a>&gt;</code></h4>
<div class='docblock'><p>The lower-level cause of this error, if any.</p> <div class='docblock'><p>The lower-level cause of this error, if any. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause">Read more</a></p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>&gt; for <a class='enum' href='../../iron/error/enum.HttpError.html' title='iron::error::HttpError'>Error</a></code></span><span class='out-of-band'></span></h3> </div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>&gt; for <a class='enum' href='../../iron/error/enum.HttpError.html' title='iron::error::HttpError'>Error</a></code></span><span class='out-of-band'></span></h3>
<div class='impl-items'><h4 id='method.from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(err: <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>) -&gt; <a class='enum' href='../../iron/error/enum.HttpError.html' title='iron::error::HttpError'>Error</a></code></h4> <div class='impl-items'><h4 id='method.from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(err: <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>) -&gt; <a class='enum' href='../../iron/error/enum.HttpError.html' title='iron::error::HttpError'>Error</a></code></h4>
</div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a>&lt;<a class='enum' href='../../url/parser/enum.ParseError.html' title='url::parser::ParseError'>ParseError</a>&gt; for <a class='enum' href='../../iron/error/enum.HttpError.html' title='iron::error::HttpError'>Error</a></code></span><span class='out-of-band'></span></h3> </div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a>&lt;<a class='enum' href='../../url/parser/enum.ParseError.html' title='url::parser::ParseError'>ParseError</a>&gt; for <a class='enum' href='../../iron/error/enum.HttpError.html' title='iron::error::HttpError'>Error</a></code></span><span class='out-of-band'></span></h3>

View file

@ -88,7 +88,7 @@ request.</p>
<div class='impl-items'><h4 id='method.description' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description' class='fnname'>description</a>(&amp;self) -&gt; &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4> <div class='impl-items'><h4 id='method.description' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description' class='fnname'>description</a>(&amp;self) -&gt; &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
<div class='docblock'><p>A short description of the error. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description">Read more</a></p> <div class='docblock'><p>A short description of the error. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description">Read more</a></p>
</div><h4 id='method.cause' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause' class='fnname'>cause</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>StdError</a>&gt;</code></h4> </div><h4 id='method.cause' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause' class='fnname'>cause</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>StdError</a>&gt;</code></h4>
<div class='docblock'><p>The lower-level cause of this error, if any.</p> <div class='docblock'><p>The lower-level cause of this error, if any. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause">Read more</a></p>
</div></div></section> </div></div></section>
<section id='search' class="content hidden"></section> <section id='search' class="content hidden"></section>

View file

@ -324,14 +324,14 @@ that via the numerals <code>1</code> and <code>0</code>.</p>
<td><a class='struct' href='struct.Cookie.html' <td><a class='struct' href='struct.Cookie.html'
title='iron::headers::Cookie'>Cookie</a></td> title='iron::headers::Cookie'>Cookie</a></td>
<td class='docblock short'> <td class='docblock short'>
<p><code>Cookie</code> header, defined in <a href="http://tools.ietf.org/html/rfc6265#section-5.4">RFC6265</a></p>
</td> </td>
</tr> </tr>
<tr class=' module-item'> <tr class=' module-item'>
<td><a class='struct' href='struct.Cookie.html' <td><a class='struct' href='struct.Cookie.html'
title='iron::headers::Cookie'>Cookie</a></td> title='iron::headers::Cookie'>Cookie</a></td>
<td class='docblock short'> <td class='docblock short'>
<p><code>Cookie</code> header, defined in <a href="http://tools.ietf.org/html/rfc6265#section-5.4">RFC6265</a></p>
</td> </td>
</tr> </tr>
<tr class=' module-item'> <tr class=' module-item'>

View file

@ -180,25 +180,75 @@ may still inform the vector that there is space for a few more elements.</p>
<p>Note that this will drop any excess capacity. Calling this and <p>Note that this will drop any excess capacity. Calling this and
converting back to a vector with <code>into_vec()</code> is equivalent to calling converting back to a vector with <code>into_vec()</code> is equivalent to calling
<code>shrink_to_fit()</code>.</p> <code>shrink_to_fit()</code>.</p>
<h1 id='examples-5' class='section-header'><a href='#examples-5'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>slice</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>into_boxed_slice</span>();</pre>
<p>Any excess capacity is removed:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>with_capacity</span>(<span class='number'>10</span>);
<span class='ident'>vec</span>.<span class='ident'>extend</span>([<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>].<span class='ident'>iter</span>().<span class='ident'>cloned</span>());
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>capacity</span>(), <span class='number'>10</span>);
<span class='kw'>let</span> <span class='ident'>slice</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>into_boxed_slice</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>slice</span>.<span class='ident'>into_vec</span>().<span class='ident'>capacity</span>(), <span class='number'>3</span>);</pre>
</div><h4 id='method.truncate' class='method'><code>fn <a href='#method.truncate' class='fnname'>truncate</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.truncate' class='method'><code>fn <a href='#method.truncate' class='fnname'>truncate</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Shorten a vector to be <code>len</code> elements long, dropping excess elements.</p> <div class='docblock'><p>Shortens the vector, keeping the first <code>len</code> elements and dropping
the rest.</p>
<p>If <code>len</code> is greater than the vector&#39;s current length, this has no <p>If <code>len</code> is greater than the vector&#39;s current length, this has no
effect.</p> effect.</p>
<h1 id='examples-5' class='section-header'><a href='#examples-5'>Examples</a></h1> <p>The <a href="#method.drain"><code>drain</code></a> method can emulate <code>truncate</code>, but causes the excess
elements to be returned instead of dropped.</p>
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1>
<p>Truncating a five element vector to two elements:</p>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>, <span class='number'>5</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>, <span class='number'>5</span>];
<span class='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>2</span>); <span class='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>2</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>]);</pre> <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>]);</pre>
<p>No truncation occurs when <code>len</code> is greater than the vector&#39;s current
length:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>8</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>]);</pre>
<p>Truncating when <code>len == 0</code> is equivalent to calling the <a href="#method.clear"><code>clear</code></a>
method.</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>0</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, []);</pre>
</div><h4 id='method.as_slice' class='method'><code>fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4> </div><h4 id='method.as_slice' class='method'><code>fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<div class='docblock'><p>Extracts a slice containing the entire vector.</p> <div class='docblock'><p>Extracts a slice containing the entire vector.</p>
<p>Equivalent to <code>&amp;s[..]</code>.</p> <p>Equivalent to <code>&amp;s[..]</code>.</p>
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::{<span class='self'>self</span>, <span class='ident'>Write</span>};
<span class='kw'>let</span> <span class='ident'>buffer</span> <span class='op'>=</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='number'>5</span>, <span class='number'>8</span>];
<span class='ident'>io</span>::<span class='ident'>sink</span>().<span class='ident'>write</span>(<span class='ident'>buffer</span>.<span class='ident'>as_slice</span>()).<span class='ident'>unwrap</span>();</pre>
</div><h4 id='method.as_mut_slice' class='method'><code>fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&amp;mut self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4> </div><h4 id='method.as_mut_slice' class='method'><code>fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&amp;mut self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<div class='docblock'><p>Extracts a mutable slice of the entire vector.</p> <div class='docblock'><p>Extracts a mutable slice of the entire vector.</p>
<p>Equivalent to <code>&amp;mut s[..]</code>.</p> <p>Equivalent to <code>&amp;mut s[..]</code>.</p>
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::{<span class='self'>self</span>, <span class='ident'>Read</span>};
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>buffer</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>; <span class='number'>3</span>];
<span class='ident'>io</span>::<span class='ident'>repeat</span>(<span class='number'>0b101</span>).<span class='ident'>read_exact</span>(<span class='ident'>buffer</span>.<span class='ident'>as_mut_slice</span>()).<span class='ident'>unwrap</span>();</pre>
</div><h4 id='method.set_len' class='method'><code>unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.set_len' class='method'><code>unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Sets the length of a vector.</p> <div class='docblock'><p>Sets the length of a vector.</p>
@ -206,11 +256,38 @@ effect.</p>
modifying its buffers, so it is up to the caller to ensure that the modifying its buffers, so it is up to the caller to ensure that the
vector is actually the specified size.</p> vector is actually the specified size.</p>
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1> <h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='number'>4</span>]; <span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>ptr</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&#39;r&#39;</span>, <span class='string'>&#39;u&#39;</span>, <span class='string'>&#39;s&#39;</span>, <span class='string'>&#39;t&#39;</span>];
<span class='kw'>unsafe</span> { <span class='kw'>unsafe</span> {
<span class='ident'>v</span>.<span class='ident'>set_len</span>(<span class='number'>1</span>); <span class='ident'>ptr</span>::<span class='ident'>drop_in_place</span>(<span class='kw-2'>&amp;</span><span class='kw-2'>mut</span> <span class='ident'>vec</span>[<span class='number'>3</span>]);
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>3</span>);
}
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='string'>&#39;r&#39;</span>, <span class='string'>&#39;u&#39;</span>, <span class='string'>&#39;s&#39;</span>]);</pre>
<p>In this example, there is a memory leak since the memory locations
owned by the inner vectors were not freed prior to the <code>set_len</code> call:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>0</span>, <span class='number'>0</span>],
<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>, <span class='number'>1</span>, <span class='number'>0</span>],
<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>, <span class='number'>0</span>, <span class='number'>1</span>]];
<span class='kw'>unsafe</span> {
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>0</span>);
}</pre>
<p>In this example, the vector gets expanded from zero to four items
without any memory allocations occurring, resulting in vector
values of unallocated memory:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='ident'>char</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
<span class='kw'>unsafe</span> {
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>4</span>);
}</pre> }</pre>
</div><h4 id='method.swap_remove' class='method'><code>fn <a href='#method.swap_remove' class='fnname'>swap_remove</a>(&amp;mut self, index: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; T</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.swap_remove' class='method'><code>fn <a href='#method.swap_remove' class='fnname'>swap_remove</a>(&amp;mut self, index: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; T</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Removes an element from anywhere in the vector and return it, replacing <div class='docblock'><p>Removes an element from anywhere in the vector and return it, replacing
@ -221,7 +298,7 @@ it with the last element.</p>
<h1 id='panics-2' class='section-header'><a href='#panics-2'>Panics</a></h1> <h1 id='panics-2' class='section-header'><a href='#panics-2'>Panics</a></h1>
<p>Panics if <code>index</code> is out of bounds.</p> <p>Panics if <code>index</code> is out of bounds.</p>
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1> <h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;baz&quot;</span>, <span class='string'>&quot;qux&quot;</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;baz&quot;</span>, <span class='string'>&quot;qux&quot;</span>];
@ -237,7 +314,7 @@ elements after it to the right.</p>
<h1 id='panics-3' class='section-header'><a href='#panics-3'>Panics</a></h1> <h1 id='panics-3' class='section-header'><a href='#panics-3'>Panics</a></h1>
<p>Panics if <code>index</code> is greater than the vector&#39;s length.</p> <p>Panics if <code>index</code> is greater than the vector&#39;s length.</p>
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1> <h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>insert</span>(<span class='number'>1</span>, <span class='number'>4</span>); <span class='ident'>vec</span>.<span class='ident'>insert</span>(<span class='number'>1</span>, <span class='number'>4</span>);
@ -251,7 +328,7 @@ shifting all elements after it to the left.</p>
<h1 id='panics-4' class='section-header'><a href='#panics-4'>Panics</a></h1> <h1 id='panics-4' class='section-header'><a href='#panics-4'>Panics</a></h1>
<p>Panics if <code>index</code> is out of bounds.</p> <p>Panics if <code>index</code> is out of bounds.</p>
<h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1> <h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>remove</span>(<span class='number'>1</span>), <span class='number'>2</span>); <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>remove</span>(<span class='number'>1</span>), <span class='number'>2</span>);
@ -263,7 +340,7 @@ shifting all elements after it to the left.</p>
This method operates in place and preserves the order of the retained This method operates in place and preserves the order of the retained
elements.</p> elements.</p>
<h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1> <h1 id='examples-13' class='section-header'><a href='#examples-13'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>];
<span class='ident'>vec</span>.<span class='ident'>retain</span>(<span class='op'>|</span><span class='kw-2'>&amp;</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>x</span><span class='op'>%</span><span class='number'>2</span> <span class='op'>==</span> <span class='number'>0</span>); <span class='ident'>vec</span>.<span class='ident'>retain</span>(<span class='op'>|</span><span class='kw-2'>&amp;</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>x</span><span class='op'>%</span><span class='number'>2</span> <span class='op'>==</span> <span class='number'>0</span>);
@ -274,7 +351,7 @@ elements.</p>
<h1 id='panics-5' class='section-header'><a href='#panics-5'>Panics</a></h1> <h1 id='panics-5' class='section-header'><a href='#panics-5'>Panics</a></h1>
<p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p> <p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p>
<h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1> <h1 id='examples-14' class='section-header'><a href='#examples-14'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>];
<span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>3</span>); <span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>3</span>);
@ -283,7 +360,7 @@ elements.</p>
<div class='docblock'><p>Removes the last element from a vector and returns it, or <code>None</code> if it <div class='docblock'><p>Removes the last element from a vector and returns it, or <code>None</code> if it
is empty.</p> is empty.</p>
<h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1> <h1 id='examples-15' class='section-header'><a href='#examples-15'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='number'>3</span>)); <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='number'>3</span>));
@ -294,7 +371,7 @@ is empty.</p>
<h1 id='panics-6' class='section-header'><a href='#panics-6'>Panics</a></h1> <h1 id='panics-6' class='section-header'><a href='#panics-6'>Panics</a></h1>
<p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p> <p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p>
<h1 id='examples-13' class='section-header'><a href='#examples-13'>Examples</a></h1> <h1 id='examples-16' class='section-header'><a href='#examples-16'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>];
@ -315,7 +392,7 @@ if the <code>Drain</code> value is leaked.</p>
<p>Panics if the starting point is greater than the end point or if <p>Panics if the starting point is greater than the end point or if
the end point is greater than the length of the vector.</p> the end point is greater than the length of the vector.</p>
<h1 id='examples-14' class='section-header'><a href='#examples-14'>Examples</a></h1> <h1 id='examples-17' class='section-header'><a href='#examples-17'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>u</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>drain</span>(<span class='number'>1</span>..).<span class='ident'>collect</span>(); <span class='kw'>let</span> <span class='ident'>u</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>drain</span>(<span class='number'>1</span>..).<span class='ident'>collect</span>();
@ -328,7 +405,7 @@ the end point is greater than the length of the vector.</p>
</div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Clears the vector, removing all values.</p> <div class='docblock'><p>Clears the vector, removing all values.</p>
<h1 id='examples-15' class='section-header'><a href='#examples-15'>Examples</a></h1> <h1 id='examples-18' class='section-header'><a href='#examples-18'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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>];
@ -338,14 +415,14 @@ the end point is greater than the length of the vector.</p>
</div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Returns the number of elements in the vector.</p> <div class='docblock'><p>Returns the number of elements in the vector.</p>
<h1 id='examples-16' class='section-header'><a href='#examples-16'>Examples</a></h1> <h1 id='examples-19' class='section-header'><a href='#examples-19'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);</pre> <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);</pre>
</div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p> <div class='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p>
<h1 id='examples-17' class='section-header'><a href='#examples-17'>Examples</a></h1> <h1 id='examples-20' class='section-header'><a href='#examples-20'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>(); <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>()); <span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>());
@ -363,7 +440,7 @@ and the returned <code>Self</code> contains elements <code>[at, len)</code>.</p>
<h1 id='panics-8' class='section-header'><a href='#panics-8'>Panics</a></h1> <h1 id='panics-8' class='section-header'><a href='#panics-8'>Panics</a></h1>
<p>Panics if <code>at &gt; len</code>.</p> <p>Panics if <code>at &gt; len</code>.</p>
<h1 id='examples-18' class='section-header'><a href='#examples-18'>Examples</a></h1> <h1 id='examples-21' class='section-header'><a href='#examples-21'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>split_off</span>(<span class='number'>1</span>); <span class='kw'>let</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>split_off</span>(<span class='number'>1</span>);
@ -376,7 +453,7 @@ and the returned <code>Self</code> contains elements <code>[at, len)</code>.</p>
difference, with each additional slot filled with <code>value</code>. difference, with each additional slot filled with <code>value</code>.
If <code>new_len</code> is less than <code>len()</code>, the <code>Vec</code> is simply truncated.</p> If <code>new_len</code> is less than <code>len()</code>, the <code>Vec</code> is simply truncated.</p>
<h1 id='examples-19' class='section-header'><a href='#examples-19'>Examples</a></h1> <h1 id='examples-22' class='section-header'><a href='#examples-22'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;hello&quot;</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;hello&quot;</span>];
<span class='ident'>vec</span>.<span class='ident'>resize</span>(<span class='number'>3</span>, <span class='string'>&quot;world&quot;</span>); <span class='ident'>vec</span>.<span class='ident'>resize</span>(<span class='number'>3</span>, <span class='string'>&quot;world&quot;</span>);
@ -396,7 +473,7 @@ specialized to work with slices instead. If and when Rust gets
specialization this function will likely be deprecated (but still specialization this function will likely be deprecated (but still
available).</p> available).</p>
<h1 id='examples-20' class='section-header'><a href='#examples-20'>Examples</a></h1> <h1 id='examples-23' class='section-header'><a href='#examples-23'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>];
<span class='ident'>vec</span>.<span class='ident'>extend_from_slice</span>(<span class='kw-2'>&amp;</span>[<span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>]); <span class='ident'>vec</span>.<span class='ident'>extend_from_slice</span>(<span class='kw-2'>&amp;</span>[<span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>]);
@ -406,7 +483,7 @@ available).</p>
<p>If the vector is sorted, this removes all duplicates.</p> <p>If the vector is sorted, this removes all duplicates.</p>
<h1 id='examples-21' class='section-header'><a href='#examples-21'>Examples</a></h1> <h1 id='examples-24' class='section-header'><a href='#examples-24'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>2</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>2</span>];

View file

@ -151,25 +151,75 @@ may still inform the vector that there is space for a few more elements.</p>
<p>Note that this will drop any excess capacity. Calling this and <p>Note that this will drop any excess capacity. Calling this and
converting back to a vector with <code>into_vec()</code> is equivalent to calling converting back to a vector with <code>into_vec()</code> is equivalent to calling
<code>shrink_to_fit()</code>.</p> <code>shrink_to_fit()</code>.</p>
<h1 id='examples-5' class='section-header'><a href='#examples-5'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>slice</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>into_boxed_slice</span>();</pre>
<p>Any excess capacity is removed:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>with_capacity</span>(<span class='number'>10</span>);
<span class='ident'>vec</span>.<span class='ident'>extend</span>([<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>].<span class='ident'>iter</span>().<span class='ident'>cloned</span>());
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>capacity</span>(), <span class='number'>10</span>);
<span class='kw'>let</span> <span class='ident'>slice</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>into_boxed_slice</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>slice</span>.<span class='ident'>into_vec</span>().<span class='ident'>capacity</span>(), <span class='number'>3</span>);</pre>
</div><h4 id='method.truncate' class='method'><code>fn <a href='#method.truncate' class='fnname'>truncate</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.truncate' class='method'><code>fn <a href='#method.truncate' class='fnname'>truncate</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Shorten a vector to be <code>len</code> elements long, dropping excess elements.</p> <div class='docblock'><p>Shortens the vector, keeping the first <code>len</code> elements and dropping
the rest.</p>
<p>If <code>len</code> is greater than the vector&#39;s current length, this has no <p>If <code>len</code> is greater than the vector&#39;s current length, this has no
effect.</p> effect.</p>
<h1 id='examples-5' class='section-header'><a href='#examples-5'>Examples</a></h1> <p>The <a href="#method.drain"><code>drain</code></a> method can emulate <code>truncate</code>, but causes the excess
elements to be returned instead of dropped.</p>
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1>
<p>Truncating a five element vector to two elements:</p>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>, <span class='number'>5</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>, <span class='number'>5</span>];
<span class='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>2</span>); <span class='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>2</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>]);</pre> <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>]);</pre>
<p>No truncation occurs when <code>len</code> is greater than the vector&#39;s current
length:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>8</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>]);</pre>
<p>Truncating when <code>len == 0</code> is equivalent to calling the <a href="#method.clear"><code>clear</code></a>
method.</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>0</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, []);</pre>
</div><h4 id='method.as_slice' class='method'><code>fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4> </div><h4 id='method.as_slice' class='method'><code>fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<div class='docblock'><p>Extracts a slice containing the entire vector.</p> <div class='docblock'><p>Extracts a slice containing the entire vector.</p>
<p>Equivalent to <code>&amp;s[..]</code>.</p> <p>Equivalent to <code>&amp;s[..]</code>.</p>
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::{<span class='self'>self</span>, <span class='ident'>Write</span>};
<span class='kw'>let</span> <span class='ident'>buffer</span> <span class='op'>=</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='number'>5</span>, <span class='number'>8</span>];
<span class='ident'>io</span>::<span class='ident'>sink</span>().<span class='ident'>write</span>(<span class='ident'>buffer</span>.<span class='ident'>as_slice</span>()).<span class='ident'>unwrap</span>();</pre>
</div><h4 id='method.as_mut_slice' class='method'><code>fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&amp;mut self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4> </div><h4 id='method.as_mut_slice' class='method'><code>fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&amp;mut self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<div class='docblock'><p>Extracts a mutable slice of the entire vector.</p> <div class='docblock'><p>Extracts a mutable slice of the entire vector.</p>
<p>Equivalent to <code>&amp;mut s[..]</code>.</p> <p>Equivalent to <code>&amp;mut s[..]</code>.</p>
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::{<span class='self'>self</span>, <span class='ident'>Read</span>};
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>buffer</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>; <span class='number'>3</span>];
<span class='ident'>io</span>::<span class='ident'>repeat</span>(<span class='number'>0b101</span>).<span class='ident'>read_exact</span>(<span class='ident'>buffer</span>.<span class='ident'>as_mut_slice</span>()).<span class='ident'>unwrap</span>();</pre>
</div><h4 id='method.set_len' class='method'><code>unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.set_len' class='method'><code>unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Sets the length of a vector.</p> <div class='docblock'><p>Sets the length of a vector.</p>
@ -177,11 +227,38 @@ effect.</p>
modifying its buffers, so it is up to the caller to ensure that the modifying its buffers, so it is up to the caller to ensure that the
vector is actually the specified size.</p> vector is actually the specified size.</p>
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1> <h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='number'>4</span>]; <span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>ptr</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&#39;r&#39;</span>, <span class='string'>&#39;u&#39;</span>, <span class='string'>&#39;s&#39;</span>, <span class='string'>&#39;t&#39;</span>];
<span class='kw'>unsafe</span> { <span class='kw'>unsafe</span> {
<span class='ident'>v</span>.<span class='ident'>set_len</span>(<span class='number'>1</span>); <span class='ident'>ptr</span>::<span class='ident'>drop_in_place</span>(<span class='kw-2'>&amp;</span><span class='kw-2'>mut</span> <span class='ident'>vec</span>[<span class='number'>3</span>]);
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>3</span>);
}
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='string'>&#39;r&#39;</span>, <span class='string'>&#39;u&#39;</span>, <span class='string'>&#39;s&#39;</span>]);</pre>
<p>In this example, there is a memory leak since the memory locations
owned by the inner vectors were not freed prior to the <code>set_len</code> call:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>0</span>, <span class='number'>0</span>],
<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>, <span class='number'>1</span>, <span class='number'>0</span>],
<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>, <span class='number'>0</span>, <span class='number'>1</span>]];
<span class='kw'>unsafe</span> {
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>0</span>);
}</pre>
<p>In this example, the vector gets expanded from zero to four items
without any memory allocations occurring, resulting in vector
values of unallocated memory:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='ident'>char</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
<span class='kw'>unsafe</span> {
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>4</span>);
}</pre> }</pre>
</div><h4 id='method.swap_remove' class='method'><code>fn <a href='#method.swap_remove' class='fnname'>swap_remove</a>(&amp;mut self, index: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; T</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.swap_remove' class='method'><code>fn <a href='#method.swap_remove' class='fnname'>swap_remove</a>(&amp;mut self, index: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; T</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Removes an element from anywhere in the vector and return it, replacing <div class='docblock'><p>Removes an element from anywhere in the vector and return it, replacing
@ -192,7 +269,7 @@ it with the last element.</p>
<h1 id='panics-2' class='section-header'><a href='#panics-2'>Panics</a></h1> <h1 id='panics-2' class='section-header'><a href='#panics-2'>Panics</a></h1>
<p>Panics if <code>index</code> is out of bounds.</p> <p>Panics if <code>index</code> is out of bounds.</p>
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1> <h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;baz&quot;</span>, <span class='string'>&quot;qux&quot;</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;baz&quot;</span>, <span class='string'>&quot;qux&quot;</span>];
@ -208,7 +285,7 @@ elements after it to the right.</p>
<h1 id='panics-3' class='section-header'><a href='#panics-3'>Panics</a></h1> <h1 id='panics-3' class='section-header'><a href='#panics-3'>Panics</a></h1>
<p>Panics if <code>index</code> is greater than the vector&#39;s length.</p> <p>Panics if <code>index</code> is greater than the vector&#39;s length.</p>
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1> <h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>insert</span>(<span class='number'>1</span>, <span class='number'>4</span>); <span class='ident'>vec</span>.<span class='ident'>insert</span>(<span class='number'>1</span>, <span class='number'>4</span>);
@ -222,7 +299,7 @@ shifting all elements after it to the left.</p>
<h1 id='panics-4' class='section-header'><a href='#panics-4'>Panics</a></h1> <h1 id='panics-4' class='section-header'><a href='#panics-4'>Panics</a></h1>
<p>Panics if <code>index</code> is out of bounds.</p> <p>Panics if <code>index</code> is out of bounds.</p>
<h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1> <h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>remove</span>(<span class='number'>1</span>), <span class='number'>2</span>); <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>remove</span>(<span class='number'>1</span>), <span class='number'>2</span>);
@ -234,7 +311,7 @@ shifting all elements after it to the left.</p>
This method operates in place and preserves the order of the retained This method operates in place and preserves the order of the retained
elements.</p> elements.</p>
<h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1> <h1 id='examples-13' class='section-header'><a href='#examples-13'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>];
<span class='ident'>vec</span>.<span class='ident'>retain</span>(<span class='op'>|</span><span class='kw-2'>&amp;</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>x</span><span class='op'>%</span><span class='number'>2</span> <span class='op'>==</span> <span class='number'>0</span>); <span class='ident'>vec</span>.<span class='ident'>retain</span>(<span class='op'>|</span><span class='kw-2'>&amp;</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>x</span><span class='op'>%</span><span class='number'>2</span> <span class='op'>==</span> <span class='number'>0</span>);
@ -245,7 +322,7 @@ elements.</p>
<h1 id='panics-5' class='section-header'><a href='#panics-5'>Panics</a></h1> <h1 id='panics-5' class='section-header'><a href='#panics-5'>Panics</a></h1>
<p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p> <p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p>
<h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1> <h1 id='examples-14' class='section-header'><a href='#examples-14'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>];
<span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>3</span>); <span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>3</span>);
@ -254,7 +331,7 @@ elements.</p>
<div class='docblock'><p>Removes the last element from a vector and returns it, or <code>None</code> if it <div class='docblock'><p>Removes the last element from a vector and returns it, or <code>None</code> if it
is empty.</p> is empty.</p>
<h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1> <h1 id='examples-15' class='section-header'><a href='#examples-15'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='number'>3</span>)); <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='number'>3</span>));
@ -265,7 +342,7 @@ is empty.</p>
<h1 id='panics-6' class='section-header'><a href='#panics-6'>Panics</a></h1> <h1 id='panics-6' class='section-header'><a href='#panics-6'>Panics</a></h1>
<p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p> <p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p>
<h1 id='examples-13' class='section-header'><a href='#examples-13'>Examples</a></h1> <h1 id='examples-16' class='section-header'><a href='#examples-16'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>];
@ -286,7 +363,7 @@ if the <code>Drain</code> value is leaked.</p>
<p>Panics if the starting point is greater than the end point or if <p>Panics if the starting point is greater than the end point or if
the end point is greater than the length of the vector.</p> the end point is greater than the length of the vector.</p>
<h1 id='examples-14' class='section-header'><a href='#examples-14'>Examples</a></h1> <h1 id='examples-17' class='section-header'><a href='#examples-17'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>u</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>drain</span>(<span class='number'>1</span>..).<span class='ident'>collect</span>(); <span class='kw'>let</span> <span class='ident'>u</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>drain</span>(<span class='number'>1</span>..).<span class='ident'>collect</span>();
@ -299,7 +376,7 @@ the end point is greater than the length of the vector.</p>
</div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Clears the vector, removing all values.</p> <div class='docblock'><p>Clears the vector, removing all values.</p>
<h1 id='examples-15' class='section-header'><a href='#examples-15'>Examples</a></h1> <h1 id='examples-18' class='section-header'><a href='#examples-18'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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>];
@ -309,14 +386,14 @@ the end point is greater than the length of the vector.</p>
</div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Returns the number of elements in the vector.</p> <div class='docblock'><p>Returns the number of elements in the vector.</p>
<h1 id='examples-16' class='section-header'><a href='#examples-16'>Examples</a></h1> <h1 id='examples-19' class='section-header'><a href='#examples-19'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);</pre> <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);</pre>
</div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p> <div class='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p>
<h1 id='examples-17' class='section-header'><a href='#examples-17'>Examples</a></h1> <h1 id='examples-20' class='section-header'><a href='#examples-20'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>(); <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>()); <span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>());
@ -334,7 +411,7 @@ and the returned <code>Self</code> contains elements <code>[at, len)</code>.</p>
<h1 id='panics-8' class='section-header'><a href='#panics-8'>Panics</a></h1> <h1 id='panics-8' class='section-header'><a href='#panics-8'>Panics</a></h1>
<p>Panics if <code>at &gt; len</code>.</p> <p>Panics if <code>at &gt; len</code>.</p>
<h1 id='examples-18' class='section-header'><a href='#examples-18'>Examples</a></h1> <h1 id='examples-21' class='section-header'><a href='#examples-21'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>split_off</span>(<span class='number'>1</span>); <span class='kw'>let</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>split_off</span>(<span class='number'>1</span>);
@ -347,7 +424,7 @@ and the returned <code>Self</code> contains elements <code>[at, len)</code>.</p>
difference, with each additional slot filled with <code>value</code>. difference, with each additional slot filled with <code>value</code>.
If <code>new_len</code> is less than <code>len()</code>, the <code>Vec</code> is simply truncated.</p> If <code>new_len</code> is less than <code>len()</code>, the <code>Vec</code> is simply truncated.</p>
<h1 id='examples-19' class='section-header'><a href='#examples-19'>Examples</a></h1> <h1 id='examples-22' class='section-header'><a href='#examples-22'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;hello&quot;</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;hello&quot;</span>];
<span class='ident'>vec</span>.<span class='ident'>resize</span>(<span class='number'>3</span>, <span class='string'>&quot;world&quot;</span>); <span class='ident'>vec</span>.<span class='ident'>resize</span>(<span class='number'>3</span>, <span class='string'>&quot;world&quot;</span>);
@ -367,7 +444,7 @@ specialized to work with slices instead. If and when Rust gets
specialization this function will likely be deprecated (but still specialization this function will likely be deprecated (but still
available).</p> available).</p>
<h1 id='examples-20' class='section-header'><a href='#examples-20'>Examples</a></h1> <h1 id='examples-23' class='section-header'><a href='#examples-23'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>];
<span class='ident'>vec</span>.<span class='ident'>extend_from_slice</span>(<span class='kw-2'>&amp;</span>[<span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>]); <span class='ident'>vec</span>.<span class='ident'>extend_from_slice</span>(<span class='kw-2'>&amp;</span>[<span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>]);
@ -377,7 +454,7 @@ available).</p>
<p>If the vector is sorted, this removes all duplicates.</p> <p>If the vector is sorted, this removes all duplicates.</p>
<h1 id='examples-21' class='section-header'><a href='#examples-21'>Examples</a></h1> <h1 id='examples-24' class='section-header'><a href='#examples-24'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>2</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>2</span>];

View file

@ -160,25 +160,75 @@ may still inform the vector that there is space for a few more elements.</p>
<p>Note that this will drop any excess capacity. Calling this and <p>Note that this will drop any excess capacity. Calling this and
converting back to a vector with <code>into_vec()</code> is equivalent to calling converting back to a vector with <code>into_vec()</code> is equivalent to calling
<code>shrink_to_fit()</code>.</p> <code>shrink_to_fit()</code>.</p>
<h1 id='examples-5' class='section-header'><a href='#examples-5'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>slice</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>into_boxed_slice</span>();</pre>
<p>Any excess capacity is removed:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>with_capacity</span>(<span class='number'>10</span>);
<span class='ident'>vec</span>.<span class='ident'>extend</span>([<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>].<span class='ident'>iter</span>().<span class='ident'>cloned</span>());
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>capacity</span>(), <span class='number'>10</span>);
<span class='kw'>let</span> <span class='ident'>slice</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>into_boxed_slice</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>slice</span>.<span class='ident'>into_vec</span>().<span class='ident'>capacity</span>(), <span class='number'>3</span>);</pre>
</div><h4 id='method.truncate' class='method'><code>fn <a href='#method.truncate' class='fnname'>truncate</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.truncate' class='method'><code>fn <a href='#method.truncate' class='fnname'>truncate</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Shorten a vector to be <code>len</code> elements long, dropping excess elements.</p> <div class='docblock'><p>Shortens the vector, keeping the first <code>len</code> elements and dropping
the rest.</p>
<p>If <code>len</code> is greater than the vector&#39;s current length, this has no <p>If <code>len</code> is greater than the vector&#39;s current length, this has no
effect.</p> effect.</p>
<h1 id='examples-5' class='section-header'><a href='#examples-5'>Examples</a></h1> <p>The <a href="#method.drain"><code>drain</code></a> method can emulate <code>truncate</code>, but causes the excess
elements to be returned instead of dropped.</p>
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1>
<p>Truncating a five element vector to two elements:</p>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>, <span class='number'>5</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>, <span class='number'>5</span>];
<span class='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>2</span>); <span class='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>2</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>]);</pre> <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>]);</pre>
<p>No truncation occurs when <code>len</code> is greater than the vector&#39;s current
length:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>8</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>]);</pre>
<p>Truncating when <code>len == 0</code> is equivalent to calling the <a href="#method.clear"><code>clear</code></a>
method.</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>0</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, []);</pre>
</div><h4 id='method.as_slice' class='method'><code>fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4> </div><h4 id='method.as_slice' class='method'><code>fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<div class='docblock'><p>Extracts a slice containing the entire vector.</p> <div class='docblock'><p>Extracts a slice containing the entire vector.</p>
<p>Equivalent to <code>&amp;s[..]</code>.</p> <p>Equivalent to <code>&amp;s[..]</code>.</p>
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::{<span class='self'>self</span>, <span class='ident'>Write</span>};
<span class='kw'>let</span> <span class='ident'>buffer</span> <span class='op'>=</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='number'>5</span>, <span class='number'>8</span>];
<span class='ident'>io</span>::<span class='ident'>sink</span>().<span class='ident'>write</span>(<span class='ident'>buffer</span>.<span class='ident'>as_slice</span>()).<span class='ident'>unwrap</span>();</pre>
</div><h4 id='method.as_mut_slice' class='method'><code>fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&amp;mut self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4> </div><h4 id='method.as_mut_slice' class='method'><code>fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&amp;mut self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<div class='docblock'><p>Extracts a mutable slice of the entire vector.</p> <div class='docblock'><p>Extracts a mutable slice of the entire vector.</p>
<p>Equivalent to <code>&amp;mut s[..]</code>.</p> <p>Equivalent to <code>&amp;mut s[..]</code>.</p>
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::{<span class='self'>self</span>, <span class='ident'>Read</span>};
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>buffer</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>; <span class='number'>3</span>];
<span class='ident'>io</span>::<span class='ident'>repeat</span>(<span class='number'>0b101</span>).<span class='ident'>read_exact</span>(<span class='ident'>buffer</span>.<span class='ident'>as_mut_slice</span>()).<span class='ident'>unwrap</span>();</pre>
</div><h4 id='method.set_len' class='method'><code>unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.set_len' class='method'><code>unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Sets the length of a vector.</p> <div class='docblock'><p>Sets the length of a vector.</p>
@ -186,11 +236,38 @@ effect.</p>
modifying its buffers, so it is up to the caller to ensure that the modifying its buffers, so it is up to the caller to ensure that the
vector is actually the specified size.</p> vector is actually the specified size.</p>
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1> <h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='number'>4</span>]; <span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>ptr</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&#39;r&#39;</span>, <span class='string'>&#39;u&#39;</span>, <span class='string'>&#39;s&#39;</span>, <span class='string'>&#39;t&#39;</span>];
<span class='kw'>unsafe</span> { <span class='kw'>unsafe</span> {
<span class='ident'>v</span>.<span class='ident'>set_len</span>(<span class='number'>1</span>); <span class='ident'>ptr</span>::<span class='ident'>drop_in_place</span>(<span class='kw-2'>&amp;</span><span class='kw-2'>mut</span> <span class='ident'>vec</span>[<span class='number'>3</span>]);
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>3</span>);
}
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='string'>&#39;r&#39;</span>, <span class='string'>&#39;u&#39;</span>, <span class='string'>&#39;s&#39;</span>]);</pre>
<p>In this example, there is a memory leak since the memory locations
owned by the inner vectors were not freed prior to the <code>set_len</code> call:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>0</span>, <span class='number'>0</span>],
<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>, <span class='number'>1</span>, <span class='number'>0</span>],
<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>, <span class='number'>0</span>, <span class='number'>1</span>]];
<span class='kw'>unsafe</span> {
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>0</span>);
}</pre>
<p>In this example, the vector gets expanded from zero to four items
without any memory allocations occurring, resulting in vector
values of unallocated memory:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='ident'>char</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
<span class='kw'>unsafe</span> {
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>4</span>);
}</pre> }</pre>
</div><h4 id='method.swap_remove' class='method'><code>fn <a href='#method.swap_remove' class='fnname'>swap_remove</a>(&amp;mut self, index: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; T</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.swap_remove' class='method'><code>fn <a href='#method.swap_remove' class='fnname'>swap_remove</a>(&amp;mut self, index: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; T</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Removes an element from anywhere in the vector and return it, replacing <div class='docblock'><p>Removes an element from anywhere in the vector and return it, replacing
@ -201,7 +278,7 @@ it with the last element.</p>
<h1 id='panics-2' class='section-header'><a href='#panics-2'>Panics</a></h1> <h1 id='panics-2' class='section-header'><a href='#panics-2'>Panics</a></h1>
<p>Panics if <code>index</code> is out of bounds.</p> <p>Panics if <code>index</code> is out of bounds.</p>
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1> <h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;baz&quot;</span>, <span class='string'>&quot;qux&quot;</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;baz&quot;</span>, <span class='string'>&quot;qux&quot;</span>];
@ -217,7 +294,7 @@ elements after it to the right.</p>
<h1 id='panics-3' class='section-header'><a href='#panics-3'>Panics</a></h1> <h1 id='panics-3' class='section-header'><a href='#panics-3'>Panics</a></h1>
<p>Panics if <code>index</code> is greater than the vector&#39;s length.</p> <p>Panics if <code>index</code> is greater than the vector&#39;s length.</p>
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1> <h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>insert</span>(<span class='number'>1</span>, <span class='number'>4</span>); <span class='ident'>vec</span>.<span class='ident'>insert</span>(<span class='number'>1</span>, <span class='number'>4</span>);
@ -231,7 +308,7 @@ shifting all elements after it to the left.</p>
<h1 id='panics-4' class='section-header'><a href='#panics-4'>Panics</a></h1> <h1 id='panics-4' class='section-header'><a href='#panics-4'>Panics</a></h1>
<p>Panics if <code>index</code> is out of bounds.</p> <p>Panics if <code>index</code> is out of bounds.</p>
<h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1> <h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>remove</span>(<span class='number'>1</span>), <span class='number'>2</span>); <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>remove</span>(<span class='number'>1</span>), <span class='number'>2</span>);
@ -243,7 +320,7 @@ shifting all elements after it to the left.</p>
This method operates in place and preserves the order of the retained This method operates in place and preserves the order of the retained
elements.</p> elements.</p>
<h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1> <h1 id='examples-13' class='section-header'><a href='#examples-13'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>];
<span class='ident'>vec</span>.<span class='ident'>retain</span>(<span class='op'>|</span><span class='kw-2'>&amp;</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>x</span><span class='op'>%</span><span class='number'>2</span> <span class='op'>==</span> <span class='number'>0</span>); <span class='ident'>vec</span>.<span class='ident'>retain</span>(<span class='op'>|</span><span class='kw-2'>&amp;</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>x</span><span class='op'>%</span><span class='number'>2</span> <span class='op'>==</span> <span class='number'>0</span>);
@ -254,7 +331,7 @@ elements.</p>
<h1 id='panics-5' class='section-header'><a href='#panics-5'>Panics</a></h1> <h1 id='panics-5' class='section-header'><a href='#panics-5'>Panics</a></h1>
<p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p> <p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p>
<h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1> <h1 id='examples-14' class='section-header'><a href='#examples-14'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>];
<span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>3</span>); <span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>3</span>);
@ -263,7 +340,7 @@ elements.</p>
<div class='docblock'><p>Removes the last element from a vector and returns it, or <code>None</code> if it <div class='docblock'><p>Removes the last element from a vector and returns it, or <code>None</code> if it
is empty.</p> is empty.</p>
<h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1> <h1 id='examples-15' class='section-header'><a href='#examples-15'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='number'>3</span>)); <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='number'>3</span>));
@ -274,7 +351,7 @@ is empty.</p>
<h1 id='panics-6' class='section-header'><a href='#panics-6'>Panics</a></h1> <h1 id='panics-6' class='section-header'><a href='#panics-6'>Panics</a></h1>
<p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p> <p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p>
<h1 id='examples-13' class='section-header'><a href='#examples-13'>Examples</a></h1> <h1 id='examples-16' class='section-header'><a href='#examples-16'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>];
@ -295,7 +372,7 @@ if the <code>Drain</code> value is leaked.</p>
<p>Panics if the starting point is greater than the end point or if <p>Panics if the starting point is greater than the end point or if
the end point is greater than the length of the vector.</p> the end point is greater than the length of the vector.</p>
<h1 id='examples-14' class='section-header'><a href='#examples-14'>Examples</a></h1> <h1 id='examples-17' class='section-header'><a href='#examples-17'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>u</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>drain</span>(<span class='number'>1</span>..).<span class='ident'>collect</span>(); <span class='kw'>let</span> <span class='ident'>u</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>drain</span>(<span class='number'>1</span>..).<span class='ident'>collect</span>();
@ -308,7 +385,7 @@ the end point is greater than the length of the vector.</p>
</div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Clears the vector, removing all values.</p> <div class='docblock'><p>Clears the vector, removing all values.</p>
<h1 id='examples-15' class='section-header'><a href='#examples-15'>Examples</a></h1> <h1 id='examples-18' class='section-header'><a href='#examples-18'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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>];
@ -318,14 +395,14 @@ the end point is greater than the length of the vector.</p>
</div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Returns the number of elements in the vector.</p> <div class='docblock'><p>Returns the number of elements in the vector.</p>
<h1 id='examples-16' class='section-header'><a href='#examples-16'>Examples</a></h1> <h1 id='examples-19' class='section-header'><a href='#examples-19'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);</pre> <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);</pre>
</div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p> <div class='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p>
<h1 id='examples-17' class='section-header'><a href='#examples-17'>Examples</a></h1> <h1 id='examples-20' class='section-header'><a href='#examples-20'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>(); <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>()); <span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>());
@ -343,7 +420,7 @@ and the returned <code>Self</code> contains elements <code>[at, len)</code>.</p>
<h1 id='panics-8' class='section-header'><a href='#panics-8'>Panics</a></h1> <h1 id='panics-8' class='section-header'><a href='#panics-8'>Panics</a></h1>
<p>Panics if <code>at &gt; len</code>.</p> <p>Panics if <code>at &gt; len</code>.</p>
<h1 id='examples-18' class='section-header'><a href='#examples-18'>Examples</a></h1> <h1 id='examples-21' class='section-header'><a href='#examples-21'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>split_off</span>(<span class='number'>1</span>); <span class='kw'>let</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>split_off</span>(<span class='number'>1</span>);
@ -356,7 +433,7 @@ and the returned <code>Self</code> contains elements <code>[at, len)</code>.</p>
difference, with each additional slot filled with <code>value</code>. difference, with each additional slot filled with <code>value</code>.
If <code>new_len</code> is less than <code>len()</code>, the <code>Vec</code> is simply truncated.</p> If <code>new_len</code> is less than <code>len()</code>, the <code>Vec</code> is simply truncated.</p>
<h1 id='examples-19' class='section-header'><a href='#examples-19'>Examples</a></h1> <h1 id='examples-22' class='section-header'><a href='#examples-22'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;hello&quot;</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;hello&quot;</span>];
<span class='ident'>vec</span>.<span class='ident'>resize</span>(<span class='number'>3</span>, <span class='string'>&quot;world&quot;</span>); <span class='ident'>vec</span>.<span class='ident'>resize</span>(<span class='number'>3</span>, <span class='string'>&quot;world&quot;</span>);
@ -376,7 +453,7 @@ specialized to work with slices instead. If and when Rust gets
specialization this function will likely be deprecated (but still specialization this function will likely be deprecated (but still
available).</p> available).</p>
<h1 id='examples-20' class='section-header'><a href='#examples-20'>Examples</a></h1> <h1 id='examples-23' class='section-header'><a href='#examples-23'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>];
<span class='ident'>vec</span>.<span class='ident'>extend_from_slice</span>(<span class='kw-2'>&amp;</span>[<span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>]); <span class='ident'>vec</span>.<span class='ident'>extend_from_slice</span>(<span class='kw-2'>&amp;</span>[<span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>]);
@ -386,7 +463,7 @@ available).</p>
<p>If the vector is sorted, this removes all duplicates.</p> <p>If the vector is sorted, this removes all duplicates.</p>
<h1 id='examples-21' class='section-header'><a href='#examples-21'>Examples</a></h1> <h1 id='examples-24' class='section-header'><a href='#examples-24'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>2</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>2</span>];

View file

@ -147,25 +147,75 @@ may still inform the vector that there is space for a few more elements.</p>
<p>Note that this will drop any excess capacity. Calling this and <p>Note that this will drop any excess capacity. Calling this and
converting back to a vector with <code>into_vec()</code> is equivalent to calling converting back to a vector with <code>into_vec()</code> is equivalent to calling
<code>shrink_to_fit()</code>.</p> <code>shrink_to_fit()</code>.</p>
<h1 id='examples-5' class='section-header'><a href='#examples-5'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>slice</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>into_boxed_slice</span>();</pre>
<p>Any excess capacity is removed:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>with_capacity</span>(<span class='number'>10</span>);
<span class='ident'>vec</span>.<span class='ident'>extend</span>([<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>].<span class='ident'>iter</span>().<span class='ident'>cloned</span>());
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>capacity</span>(), <span class='number'>10</span>);
<span class='kw'>let</span> <span class='ident'>slice</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>into_boxed_slice</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>slice</span>.<span class='ident'>into_vec</span>().<span class='ident'>capacity</span>(), <span class='number'>3</span>);</pre>
</div><h4 id='method.truncate' class='method'><code>fn <a href='#method.truncate' class='fnname'>truncate</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.truncate' class='method'><code>fn <a href='#method.truncate' class='fnname'>truncate</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Shorten a vector to be <code>len</code> elements long, dropping excess elements.</p> <div class='docblock'><p>Shortens the vector, keeping the first <code>len</code> elements and dropping
the rest.</p>
<p>If <code>len</code> is greater than the vector&#39;s current length, this has no <p>If <code>len</code> is greater than the vector&#39;s current length, this has no
effect.</p> effect.</p>
<h1 id='examples-5' class='section-header'><a href='#examples-5'>Examples</a></h1> <p>The <a href="#method.drain"><code>drain</code></a> method can emulate <code>truncate</code>, but causes the excess
elements to be returned instead of dropped.</p>
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1>
<p>Truncating a five element vector to two elements:</p>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>, <span class='number'>5</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>, <span class='number'>5</span>];
<span class='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>2</span>); <span class='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>2</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>]);</pre> <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>]);</pre>
<p>No truncation occurs when <code>len</code> is greater than the vector&#39;s current
length:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>8</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>3</span>]);</pre>
<p>Truncating when <code>len == 0</code> is equivalent to calling the <a href="#method.clear"><code>clear</code></a>
method.</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>truncate</span>(<span class='number'>0</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, []);</pre>
</div><h4 id='method.as_slice' class='method'><code>fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4> </div><h4 id='method.as_slice' class='method'><code>fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<div class='docblock'><p>Extracts a slice containing the entire vector.</p> <div class='docblock'><p>Extracts a slice containing the entire vector.</p>
<p>Equivalent to <code>&amp;s[..]</code>.</p> <p>Equivalent to <code>&amp;s[..]</code>.</p>
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::{<span class='self'>self</span>, <span class='ident'>Write</span>};
<span class='kw'>let</span> <span class='ident'>buffer</span> <span class='op'>=</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='number'>5</span>, <span class='number'>8</span>];
<span class='ident'>io</span>::<span class='ident'>sink</span>().<span class='ident'>write</span>(<span class='ident'>buffer</span>.<span class='ident'>as_slice</span>()).<span class='ident'>unwrap</span>();</pre>
</div><h4 id='method.as_mut_slice' class='method'><code>fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&amp;mut self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4> </div><h4 id='method.as_mut_slice' class='method'><code>fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&amp;mut self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [T]</a></code><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<div class='docblock'><p>Extracts a mutable slice of the entire vector.</p> <div class='docblock'><p>Extracts a mutable slice of the entire vector.</p>
<p>Equivalent to <code>&amp;mut s[..]</code>.</p> <p>Equivalent to <code>&amp;mut s[..]</code>.</p>
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::{<span class='self'>self</span>, <span class='ident'>Read</span>};
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>buffer</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>; <span class='number'>3</span>];
<span class='ident'>io</span>::<span class='ident'>repeat</span>(<span class='number'>0b101</span>).<span class='ident'>read_exact</span>(<span class='ident'>buffer</span>.<span class='ident'>as_mut_slice</span>()).<span class='ident'>unwrap</span>();</pre>
</div><h4 id='method.set_len' class='method'><code>unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.set_len' class='method'><code>unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Sets the length of a vector.</p> <div class='docblock'><p>Sets the length of a vector.</p>
@ -173,11 +223,38 @@ effect.</p>
modifying its buffers, so it is up to the caller to ensure that the modifying its buffers, so it is up to the caller to ensure that the
vector is actually the specified size.</p> vector is actually the specified size.</p>
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1> <h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='number'>4</span>]; <span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>ptr</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&#39;r&#39;</span>, <span class='string'>&#39;u&#39;</span>, <span class='string'>&#39;s&#39;</span>, <span class='string'>&#39;t&#39;</span>];
<span class='kw'>unsafe</span> { <span class='kw'>unsafe</span> {
<span class='ident'>v</span>.<span class='ident'>set_len</span>(<span class='number'>1</span>); <span class='ident'>ptr</span>::<span class='ident'>drop_in_place</span>(<span class='kw-2'>&amp;</span><span class='kw-2'>mut</span> <span class='ident'>vec</span>[<span class='number'>3</span>]);
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>3</span>);
}
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='string'>&#39;r&#39;</span>, <span class='string'>&#39;u&#39;</span>, <span class='string'>&#39;s&#39;</span>]);</pre>
<p>In this example, there is a memory leak since the memory locations
owned by the inner vectors were not freed prior to the <code>set_len</code> call:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>0</span>, <span class='number'>0</span>],
<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>, <span class='number'>1</span>, <span class='number'>0</span>],
<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>, <span class='number'>0</span>, <span class='number'>1</span>]];
<span class='kw'>unsafe</span> {
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>0</span>);
}</pre>
<p>In this example, the vector gets expanded from zero to four items
without any memory allocations occurring, resulting in vector
values of unallocated memory:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='ident'>char</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
<span class='kw'>unsafe</span> {
<span class='ident'>vec</span>.<span class='ident'>set_len</span>(<span class='number'>4</span>);
}</pre> }</pre>
</div><h4 id='method.swap_remove' class='method'><code>fn <a href='#method.swap_remove' class='fnname'>swap_remove</a>(&amp;mut self, index: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; T</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.swap_remove' class='method'><code>fn <a href='#method.swap_remove' class='fnname'>swap_remove</a>(&amp;mut self, index: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; T</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Removes an element from anywhere in the vector and return it, replacing <div class='docblock'><p>Removes an element from anywhere in the vector and return it, replacing
@ -188,7 +265,7 @@ it with the last element.</p>
<h1 id='panics-2' class='section-header'><a href='#panics-2'>Panics</a></h1> <h1 id='panics-2' class='section-header'><a href='#panics-2'>Panics</a></h1>
<p>Panics if <code>index</code> is out of bounds.</p> <p>Panics if <code>index</code> is out of bounds.</p>
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1> <h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;baz&quot;</span>, <span class='string'>&quot;qux&quot;</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;baz&quot;</span>, <span class='string'>&quot;qux&quot;</span>];
@ -204,7 +281,7 @@ elements after it to the right.</p>
<h1 id='panics-3' class='section-header'><a href='#panics-3'>Panics</a></h1> <h1 id='panics-3' class='section-header'><a href='#panics-3'>Panics</a></h1>
<p>Panics if <code>index</code> is greater than the vector&#39;s length.</p> <p>Panics if <code>index</code> is greater than the vector&#39;s length.</p>
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1> <h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='ident'>vec</span>.<span class='ident'>insert</span>(<span class='number'>1</span>, <span class='number'>4</span>); <span class='ident'>vec</span>.<span class='ident'>insert</span>(<span class='number'>1</span>, <span class='number'>4</span>);
@ -218,7 +295,7 @@ shifting all elements after it to the left.</p>
<h1 id='panics-4' class='section-header'><a href='#panics-4'>Panics</a></h1> <h1 id='panics-4' class='section-header'><a href='#panics-4'>Panics</a></h1>
<p>Panics if <code>index</code> is out of bounds.</p> <p>Panics if <code>index</code> is out of bounds.</p>
<h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1> <h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>remove</span>(<span class='number'>1</span>), <span class='number'>2</span>); <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>remove</span>(<span class='number'>1</span>), <span class='number'>2</span>);
@ -230,7 +307,7 @@ shifting all elements after it to the left.</p>
This method operates in place and preserves the order of the retained This method operates in place and preserves the order of the retained
elements.</p> elements.</p>
<h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1> <h1 id='examples-13' class='section-header'><a href='#examples-13'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='number'>4</span>];
<span class='ident'>vec</span>.<span class='ident'>retain</span>(<span class='op'>|</span><span class='kw-2'>&amp;</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>x</span><span class='op'>%</span><span class='number'>2</span> <span class='op'>==</span> <span class='number'>0</span>); <span class='ident'>vec</span>.<span class='ident'>retain</span>(<span class='op'>|</span><span class='kw-2'>&amp;</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>x</span><span class='op'>%</span><span class='number'>2</span> <span class='op'>==</span> <span class='number'>0</span>);
@ -241,7 +318,7 @@ elements.</p>
<h1 id='panics-5' class='section-header'><a href='#panics-5'>Panics</a></h1> <h1 id='panics-5' class='section-header'><a href='#panics-5'>Panics</a></h1>
<p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p> <p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p>
<h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1> <h1 id='examples-14' class='section-header'><a href='#examples-14'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>];
<span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>3</span>); <span class='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>3</span>);
@ -250,7 +327,7 @@ elements.</p>
<div class='docblock'><p>Removes the last element from a vector and returns it, or <code>None</code> if it <div class='docblock'><p>Removes the last element from a vector and returns it, or <code>None</code> if it
is empty.</p> is empty.</p>
<h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1> <h1 id='examples-15' class='section-header'><a href='#examples-15'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='number'>3</span>)); <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='number'>3</span>));
@ -261,7 +338,7 @@ is empty.</p>
<h1 id='panics-6' class='section-header'><a href='#panics-6'>Panics</a></h1> <h1 id='panics-6' class='section-header'><a href='#panics-6'>Panics</a></h1>
<p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p> <p>Panics if the number of elements in the vector overflows a <code>usize</code>.</p>
<h1 id='examples-13' class='section-header'><a href='#examples-13'>Examples</a></h1> <h1 id='examples-16' class='section-header'><a href='#examples-16'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>];
@ -282,7 +359,7 @@ if the <code>Drain</code> value is leaked.</p>
<p>Panics if the starting point is greater than the end point or if <p>Panics if the starting point is greater than the end point or if
the end point is greater than the length of the vector.</p> the end point is greater than the length of the vector.</p>
<h1 id='examples-14' class='section-header'><a href='#examples-14'>Examples</a></h1> <h1 id='examples-17' class='section-header'><a href='#examples-17'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>u</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>drain</span>(<span class='number'>1</span>..).<span class='ident'>collect</span>(); <span class='kw'>let</span> <span class='ident'>u</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>v</span>.<span class='ident'>drain</span>(<span class='number'>1</span>..).<span class='ident'>collect</span>();
@ -295,7 +372,7 @@ the end point is greater than the length of the vector.</p>
</div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Clears the vector, removing all values.</p> <div class='docblock'><p>Clears the vector, removing all values.</p>
<h1 id='examples-15' class='section-header'><a href='#examples-15'>Examples</a></h1> <h1 id='examples-18' class='section-header'><a href='#examples-18'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</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>];
@ -305,14 +382,14 @@ the end point is greater than the length of the vector.</p>
</div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Returns the number of elements in the vector.</p> <div class='docblock'><p>Returns the number of elements in the vector.</p>
<h1 id='examples-16' class='section-header'><a href='#examples-16'>Examples</a></h1> <h1 id='examples-19' class='section-header'><a href='#examples-19'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);</pre> <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);</pre>
</div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4> </div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p> <div class='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p>
<h1 id='examples-17' class='section-header'><a href='#examples-17'>Examples</a></h1> <h1 id='examples-20' class='section-header'><a href='#examples-20'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>(); <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>()); <span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>());
@ -330,7 +407,7 @@ and the returned <code>Self</code> contains elements <code>[at, len)</code>.</p>
<h1 id='panics-8' class='section-header'><a href='#panics-8'>Panics</a></h1> <h1 id='panics-8' class='section-header'><a href='#panics-8'>Panics</a></h1>
<p>Panics if <code>at &gt; len</code>.</p> <p>Panics if <code>at &gt; len</code>.</p>
<h1 id='examples-18' class='section-header'><a href='#examples-18'>Examples</a></h1> <h1 id='examples-21' class='section-header'><a href='#examples-21'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</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='kw'>let</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>split_off</span>(<span class='number'>1</span>); <span class='kw'>let</span> <span class='ident'>vec2</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>split_off</span>(<span class='number'>1</span>);
@ -343,7 +420,7 @@ and the returned <code>Self</code> contains elements <code>[at, len)</code>.</p>
difference, with each additional slot filled with <code>value</code>. difference, with each additional slot filled with <code>value</code>.
If <code>new_len</code> is less than <code>len()</code>, the <code>Vec</code> is simply truncated.</p> If <code>new_len</code> is less than <code>len()</code>, the <code>Vec</code> is simply truncated.</p>
<h1 id='examples-19' class='section-header'><a href='#examples-19'>Examples</a></h1> <h1 id='examples-22' class='section-header'><a href='#examples-22'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;hello&quot;</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;hello&quot;</span>];
<span class='ident'>vec</span>.<span class='ident'>resize</span>(<span class='number'>3</span>, <span class='string'>&quot;world&quot;</span>); <span class='ident'>vec</span>.<span class='ident'>resize</span>(<span class='number'>3</span>, <span class='string'>&quot;world&quot;</span>);
@ -363,7 +440,7 @@ specialized to work with slices instead. If and when Rust gets
specialization this function will likely be deprecated (but still specialization this function will likely be deprecated (but still
available).</p> available).</p>
<h1 id='examples-20' class='section-header'><a href='#examples-20'>Examples</a></h1> <h1 id='examples-23' class='section-header'><a href='#examples-23'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>];
<span class='ident'>vec</span>.<span class='ident'>extend_from_slice</span>(<span class='kw-2'>&amp;</span>[<span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>]); <span class='ident'>vec</span>.<span class='ident'>extend_from_slice</span>(<span class='kw-2'>&amp;</span>[<span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>4</span>]);
@ -373,7 +450,7 @@ available).</p>
<p>If the vector is sorted, this removes all duplicates.</p> <p>If the vector is sorted, this removes all duplicates.</p>
<h1 id='examples-21' class='section-header'><a href='#examples-21'>Examples</a></h1> <h1 id='examples-24' class='section-header'><a href='#examples-24'>Examples</a></h1>
<pre class='rust rust-example-rendered'> <pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>2</span>]; <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>vec</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>1</span>, <span class='number'>2</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>2</span>];

Some files were not shown because too many files have changed in this diff Show more