Update documentation for Juniper

This commit is contained in:
Juniper Documentation Builder 2016-09-22 18:31:11 +00:00
parent 9b77f57e47
commit 33bcf0f37a
36 changed files with 549 additions and 153 deletions

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

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

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;'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>",]; 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>",];
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["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"] = []; 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"] = [];
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["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"] = []; 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"] = [];
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.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"] = []; 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"] = [];
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

@ -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

@ -47,50 +47,360 @@
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>] [<span class='inner'>&#x2212;</span>]
</a> </a>
</span><a id='src-283' class='srclink' href='../../cookie/struct.Cookie.html?gotosrc=283' title='goto source code'>[src]</a></span></h1> </span><a id='src-2225' class='srclink' href='../../hyper/header/common/cookie/struct.Cookie.html?gotosrc=2225' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Cookie { <pre class='rust struct'>pub struct Cookie(pub <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>&gt;);</pre><div class='docblock'><p><code>Cookie</code> header, defined in <a href="http://tools.ietf.org/html/rfc6265#section-5.4">RFC6265</a></p>
pub name: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>,
pub value: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>, <p>If the user agent does attach a Cookie header field to an HTTP
pub expires: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='../../time/struct.Tm.html' title='time::Tm'>Tm</a>&gt;, request, the user agent must send the cookie-string
pub max_age: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>&gt;, as the value of the header field.</p>
pub domain: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>&gt;,
pub path: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>&gt;, <p>When the user agent generates an HTTP request, the user agent MUST NOT
pub secure: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, attach more than one Cookie header field.</p>
pub httponly: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>,
pub custom: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/map/struct.BTreeMap.html' title='collections::btree::map::BTreeMap'>BTreeMap</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>,&nbsp;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>&gt;, <h1 id='example-values' class='section-header'><a href='#example-values'>Example values</a></h1>
}</pre><h2 class='fields'>Fields</h2><span id='structfield.name' class='structfield'><code>name: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a></code> <ul>
</span><span class='stab '></span><span id='structfield.value' class='structfield'><code>value: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a></code> <li><code>SID=31d4d96e407aad42</code></li>
</span><span class='stab '></span><span id='structfield.expires' class='structfield'><code>expires: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='../../time/struct.Tm.html' title='time::Tm'>Tm</a>&gt;</code> <li><code>SID=31d4d96e407aad42; lang=en-US</code></li>
</span><span class='stab '></span><span id='structfield.max_age' class='structfield'><code>max_age: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>&gt;</code> </ul>
</span><span class='stab '></span><span id='structfield.domain' class='structfield'><code>domain: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>&gt;</code>
</span><span class='stab '></span><span id='structfield.path' class='structfield'><code>path: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>&gt;</code> <h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
</span><span class='stab '></span><span id='structfield.secure' class='structfield'><code>secure: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code> <pre class='rust rust-example-rendered'>
</span><span class='stab '></span><span id='structfield.httponly' class='structfield'><code>httponly: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code> <span class='kw'>use</span> <span class='ident'>hyper</span>::<span class='ident'>header</span>::{<span class='ident'>Headers</span>, <span class='ident'>Cookie</span>};
</span><span class='stab '></span><span id='structfield.custom' class='structfield'><code>custom: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/map/struct.BTreeMap.html' title='collections::btree::map::BTreeMap'>BTreeMap</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>,&nbsp;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>&gt;</code> <span class='kw'>use</span> <span class='ident'>cookie</span>::<span class='ident'>Cookie</span> <span class='kw'>as</span> <span class='ident'>CookiePair</span>;
</span><span class='stab '></span><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3>
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>(name: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>, value: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>) -&gt; <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></h4> <span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>headers</span> <span class='op'>=</span> <span class='ident'>Headers</span>::<span class='ident'>new</span>();
<h4 id='method.parse' class='method'><code>fn <a href='#method.parse' class='fnname'>parse</a>(s: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>,&nbsp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h4>
<h4 id='method.pair' class='method'><code>fn <a href='#method.pair' class='fnname'>pair</a>(&amp;self) -&gt; <a class='struct' href='../../cookie/struct.AttrVal.html' title='cookie::AttrVal'>AttrVal</a></code></h4> <span class='ident'>headers</span>.<span class='ident'>set</span>(
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3> <span class='ident'>Cookie</span>(<span class='macro'>vec</span><span class='macro'>!</span>[
<span class='ident'>CookiePair</span>::<span class='ident'>new</span>(<span class='string'>&quot;foo&quot;</span>.<span class='ident'>to_owned</span>(), <span class='string'>&quot;bar&quot;</span>.<span class='ident'>to_owned</span>())
])
);</pre>
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3>
<div class='impl-items'><h4 id='method.to_cookie_jar' class='method'><code>fn <a href='#method.to_cookie_jar' class='fnname'>to_cookie_jar</a>(&amp;self, key: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -&gt; <a class='struct' href='../../iron/headers/struct.CookieJar.html' title='iron::headers::CookieJar'>CookieJar</a>&lt;'static&gt;</code></h4>
<div class='docblock'><p>This method can be used to create CookieJar that can be used
to manipulate cookies and create a corresponding <code>SetCookie</code> header afterwards.</p>
</div><h4 id='method.from_cookie_jar' class='method'><code>fn <a href='#method.from_cookie_jar' class='fnname'>from_cookie_jar</a>(jar: &amp;<a class='struct' href='../../iron/headers/struct.CookieJar.html' title='iron::headers::CookieJar'>CookieJar</a>) -&gt; <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></h4>
<div class='docblock'><p>Extracts all cookies from <code>CookieJar</code> and creates Cookie header.
Useful for clients.</p>
</div></div><h2 id='deref-methods'>Methods from <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Deref.html' title='core::ops::Deref'>Deref</a>&lt;Target=<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>&gt;&gt;</h2><div class='impl-items'><h4 id='method.capacity' class='method'><code>fn <a href='#method.capacity' class='fnname'>capacity</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 the vector can hold without
reallocating.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>vec</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='ident'>i32</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>with_capacity</span>(<span class='number'>10</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>);</pre>
</div><h4 id='method.reserve' class='method'><code>fn <a href='#method.reserve' class='fnname'>reserve</a>(&amp;mut self, additional: <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>Reserves capacity for at least <code>additional</code> more elements to be inserted
in the given <code>Vec&lt;T&gt;</code>. The collection may reserve more space to avoid
frequent reallocations.</p>
<h1 id='panics' class='section-header'><a href='#panics'>Panics</a></h1>
<p>Panics if the new capacity overflows <code>usize</code>.</p>
<h1 id='examples-1' class='section-header'><a href='#examples-1'>Examples</a></h1>
<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='ident'>vec</span>.<span class='ident'>reserve</span>(<span class='number'>10</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>capacity</span>() <span class='op'>&gt;=</span> <span class='number'>11</span>);</pre>
</div><h4 id='method.reserve_exact' class='method'><code>fn <a href='#method.reserve_exact' class='fnname'>reserve_exact</a>(&amp;mut self, additional: <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>Reserves the minimum capacity for exactly <code>additional</code> more elements to
be inserted in the given <code>Vec&lt;T&gt;</code>. Does nothing if the capacity is already
sufficient.</p>
<p>Note that the allocator may give the collection more space than it
requests. Therefore capacity can not be relied upon to be precisely
minimal. Prefer <code>reserve</code> if future insertions are expected.</p>
<h1 id='panics-1' class='section-header'><a href='#panics-1'>Panics</a></h1>
<p>Panics if the new capacity overflows <code>usize</code>.</p>
<h1 id='examples-2' class='section-header'><a href='#examples-2'>Examples</a></h1>
<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='ident'>vec</span>.<span class='ident'>reserve_exact</span>(<span class='number'>10</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>capacity</span>() <span class='op'>&gt;=</span> <span class='number'>11</span>);</pre>
</div><h4 id='method.shrink_to_fit' class='method'><code>fn <a href='#method.shrink_to_fit' class='fnname'>shrink_to_fit</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>Shrinks the capacity of the vector as much as possible.</p>
<p>It will drop down as close as possible to the length but the allocator
may still inform the vector that there is space for a few more elements.</p>
<h1 id='examples-3' class='section-header'><a href='#examples-3'>Examples</a></h1>
<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='ident'>vec</span>.<span class='ident'>shrink_to_fit</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>vec</span>.<span class='ident'>capacity</span>() <span class='op'>&gt;=</span> <span class='number'>3</span>);</pre>
</div><h4 id='method.into_boxed_slice' class='method'><code>fn <a href='#method.into_boxed_slice' class='fnname'>into_boxed_slice</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</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;</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Converts the vector into Box&lt;[T]&gt;.</p>
<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
<code>shrink_to_fit()</code>.</p>
</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>
<p>If <code>len</code> is greater than the vector&#39;s current length, this has no
effect.</p>
<h1 id='examples-4' class='section-header'><a href='#examples-4'>Examples</a></h1>
<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='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>
</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>
<p>Equivalent to <code>&amp;s[..]</code>.</p>
</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>
<p>Equivalent to <code>&amp;mut s[..]</code>.</p>
</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>
<p>This will explicitly set the size of the vector, without actually
modifying its buffers, so it is up to the caller to ensure that the
vector is actually the specified size.</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='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'>unsafe</span> {
<span class='ident'>v</span>.<span class='ident'>set_len</span>(<span class='number'>1</span>);
}</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 class='docblock'><p>Removes an element from anywhere in the vector and return it, replacing
it with the last element.</p>
<p>This does not preserve ordering, but is O(1).</p>
<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>
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1>
<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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>swap_remove</span>(<span class='number'>1</span>), <span class='string'>&quot;bar&quot;</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;qux&quot;</span>, <span class='string'>&quot;baz&quot;</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>swap_remove</span>(<span class='number'>0</span>), <span class='string'>&quot;foo&quot;</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;baz&quot;</span>, <span class='string'>&quot;qux&quot;</span>]);</pre>
</div><h4 id='method.insert' class='method'><code>fn <a href='#method.insert' class='fnname'>insert</a>(&amp;mut self, index: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, element: T)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Inserts an element at position <code>index</code> within the vector, shifting all
elements after it to the right.</p>
<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>
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1>
<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'>insert</span>(<span class='number'>1</span>, <span class='number'>4</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>4</span>, <span class='number'>2</span>, <span class='number'>3</span>]);
<span class='ident'>vec</span>.<span class='ident'>insert</span>(<span class='number'>4</span>, <span class='number'>5</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>, <span class='number'>4</span>, <span class='number'>2</span>, <span class='number'>3</span>, <span class='number'>5</span>]);</pre>
</div><h4 id='method.remove' class='method'><code>fn <a href='#method.remove' class='fnname'>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 and returns the element at position <code>index</code> within the vector,
shifting all elements after it to the left.</p>
<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>
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1>
<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='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='number'>1</span>, <span class='number'>3</span>]);</pre>
</div><h4 id='method.retain' class='method'><code>fn <a href='#method.retain' class='fnname'>retain</a>&lt;F&gt;(&amp;mut self, f: F) <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;T) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Retains only the elements specified by the predicate.</p>
<p>In other words, remove all elements <code>e</code> such that <code>f(&amp;e)</code> returns false.
This method operates in place and preserves the order of the retained
elements.</p>
<h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1>
<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='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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>2</span>, <span class='number'>4</span>]);</pre>
</div><h4 id='method.push' class='method'><code>fn <a href='#method.push' class='fnname'>push</a>(&amp;mut self, value: T)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Appends an element to the back of a collection.</p>
<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>
<h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1>
<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='ident'>vec</span>.<span class='ident'>push</span>(<span class='number'>3</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>
</div><h4 id='method.pop' class='method'><code>fn <a href='#method.pop' class='fnname'>pop</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;T&gt;</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Removes the last element from a vector and returns it, or <code>None</code> if it
is empty.</p>
<h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1>
<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='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='number'>1</span>, <span class='number'>2</span>]);</pre>
</div><h4 id='method.append' class='method'><code>fn <a href='#method.append' class='fnname'>append</a>(&amp;mut self, other: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;)</code><div class='since' title='Stable since Rust version 1.4.0'>1.4.0</div></h4>
<div class='docblock'><p>Moves all the elements of <code>other</code> into <code>Self</code>, leaving <code>other</code> empty.</p>
<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>
<h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1>
<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'>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='ident'>vec</span>.<span class='ident'>append</span>(<span class='kw-2'>&amp;</span><span class='kw-2'>mut</span> <span class='ident'>vec2</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>, <span class='number'>4</span>, <span class='number'>5</span>, <span class='number'>6</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec2</span>, []);</pre>
</div><h4 id='method.drain' class='method'><code>fn <a href='#method.drain' class='fnname'>drain</a>&lt;R&gt;(&amp;mut self, range: R) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Drain.html' title='collections::vec::Drain'>Drain</a>&lt;T&gt; <span class='where'>where R: <a class='trait' href='https://doc.rust-lang.org/nightly/collections/range/trait.RangeArgument.html' title='collections::range::RangeArgument'>RangeArgument</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt;</span></code><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div></h4>
<div class='docblock'><p>Create a draining iterator that removes the specified range in the vector
and yields the removed items.</p>
<p>Note 1: The element range is removed even if the iterator is not
consumed until the end.</p>
<p>Note 2: It is unspecified how many elements are removed from the vector,
if the <code>Drain</code> value is leaked.</p>
<h1 id='panics-7' class='section-header'><a href='#panics-7'>Panics</a></h1>
<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>
<h1 id='examples-13' class='section-header'><a href='#examples-13'>Examples</a></h1>
<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='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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, <span class='kw-2'>&amp;</span>[<span class='number'>1</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>u</span>, <span class='kw-2'>&amp;</span>[<span class='number'>2</span>, <span class='number'>3</span>]);
<span class='comment'>// A full range clears the vector</span>
<span class='ident'>v</span>.<span class='ident'>drain</span>(..);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, <span class='kw-2'>&amp;</span>[]);</pre>
</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>
<h1 id='examples-14' class='section-header'><a href='#examples-14'>Examples</a></h1>
<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='ident'>v</span>.<span class='ident'>clear</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>());</pre>
</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>
<h1 id='examples-15' class='section-header'><a href='#examples-15'>Examples</a></h1>
<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='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 class='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p>
<h1 id='examples-16' class='section-header'><a href='#examples-16'>Examples</a></h1>
<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='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>v</span>.<span class='ident'>is_empty</span>());
<span class='ident'>v</span>.<span class='ident'>push</span>(<span class='number'>1</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>v</span>.<span class='ident'>is_empty</span>());</pre>
</div><h4 id='method.split_off' class='method'><code>fn <a href='#method.split_off' class='fnname'>split_off</a>(&amp;mut self, at: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;T&gt;</code><div class='since' title='Stable since Rust version 1.4.0'>1.4.0</div></h4>
<div class='docblock'><p>Splits the collection into two at the given index.</p>
<p>Returns a newly allocated <code>Self</code>. <code>self</code> contains elements <code>[0, at)</code>,
and the returned <code>Self</code> contains elements <code>[at, len)</code>.</p>
<p>Note that the capacity of <code>self</code> does not change.</p>
<h1 id='panics-8' class='section-header'><a href='#panics-8'>Panics</a></h1>
<p>Panics if <code>at &gt; len</code>.</p>
<h1 id='examples-17' class='section-header'><a href='#examples-17'>Examples</a></h1>
<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='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='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='number'>1</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec2</span>, [<span class='number'>2</span>, <span class='number'>3</span>]);</pre>
</div></div><div class='impl-items'><h4 id='method.resize' class='method'><code>fn <a href='#method.resize' class='fnname'>resize</a>(&amp;mut self, new_len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, value: T)</code><div class='since' title='Stable since Rust version 1.5.0'>1.5.0</div></h4>
<div class='docblock'><p>Resizes the <code>Vec</code> in-place so that <code>len()</code> is equal to <code>new_len</code>.</p>
<p>If <code>new_len</code> is greater than <code>len()</code>, the <code>Vec</code> is extended by the
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>
<h1 id='examples-18' class='section-header'><a href='#examples-18'>Examples</a></h1>
<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='ident'>vec</span>.<span class='ident'>resize</span>(<span class='number'>3</span>, <span class='string'>&quot;world&quot;</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>vec</span>, [<span class='string'>&quot;hello&quot;</span>, <span class='string'>&quot;world&quot;</span>, <span class='string'>&quot;world&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='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'>resize</span>(<span class='number'>2</span>, <span class='number'>0</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>
</div><h4 id='method.extend_from_slice' class='method'><code>fn <a href='#method.extend_from_slice' class='fnname'>extend_from_slice</a>(&amp;mut self, other: <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.6.0'>1.6.0</div></h4>
<div class='docblock'><p>Clones and appends all elements in a slice to the <code>Vec</code>.</p>
<p>Iterates over the slice <code>other</code>, clones each element, and then appends
it to this <code>Vec</code>. The <code>other</code> vector is traversed in-order.</p>
<p>Note that this function is same as <code>extend</code> except that it is
specialized to work with slices instead. If and when Rust gets
specialization this function will likely be deprecated (but still
available).</p>
<h1 id='examples-19' class='section-header'><a href='#examples-19'>Examples</a></h1>
<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='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='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>, <span class='number'>4</span>]);</pre>
</div></div><div class='impl-items'><h4 id='method.dedup' class='method'><code>fn <a href='#method.dedup' class='fnname'>dedup</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>Removes consecutive repeated elements in the vector.</p>
<p>If the vector is sorted, this removes all duplicates.</p>
<h1 id='examples-20' class='section-header'><a href='#examples-20'>Examples</a></h1>
<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='ident'>vec</span>.<span class='ident'>dedup</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>, <span class='number'>2</span>]);</pre>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3>
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>,&nbsp;<a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html' title='core::fmt::Error'>Error</a>&gt;</code></h4> <div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>,&nbsp;<a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html' title='core::fmt::Error'>Error</a>&gt;</code></h4>
<div class='docblock'><p>Formats the value using the given formatter.</p> <div class='docblock'><p>Formats the value using the given formatter.</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3>
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></h4>
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">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/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>&gt; for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</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/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>&gt; for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3>
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, __arg_0: &amp;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4> <div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, __arg_0: &amp;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> <div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, __arg_0: &amp;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4> </div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, __arg_0: &amp;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p> <div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</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/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3>
<div class='impl-items'><h4 id='method.fmt-1' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>,&nbsp;<a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html' title='core::fmt::Error'>Error</a>&gt;</code></h4> <div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></h4>
<div class='docblock'><p>Formats the value using the given formatter.</p> <div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">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/str/trait.FromStr.html' title='core::str::FromStr'>FromStr</a> for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3> </div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='impl-items'><h4 id='associatedtype.Err' class='type'><code>type <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err' class='type'>Err</a> = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></code></h4> <div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
<h4 id='method.from_str' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str' class='fnname'>from_str</a>(s: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>,&nbsp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h4> </div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Deref.html' title='core::ops::Deref'>Deref</a> for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3>
</div></section> <div class='impl-items'><h4 id='associatedtype.Target' class='type'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/trait.Deref.html#associatedtype.Target' class='type'>Target</a> = <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>&gt;</code></h4>
<div class='docblock'><p>The resulting type after dereferencing</p>
</div><h4 id='method.deref' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&amp;self) -&gt; &amp;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>&gt;</code></h4>
<div class='docblock'><p>The method called to dereference a value</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.DerefMut.html' title='core::ops::DerefMut'>DerefMut</a> for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3>
<div class='impl-items'><h4 id='method.deref_mut' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/trait.DerefMut.html#tymethod.deref_mut' class='fnname'>deref_mut</a>(&amp;mut self) -&gt; &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>&gt;</code></h4>
</div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='../../iron/headers/trait.Header.html' title='iron::headers::Header'>Header</a> for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3>
<div class='impl-items'><h4 id='method.header_name' class='method'><code>fn <a href='../../iron/headers/trait.Header.html#tymethod.header_name' class='fnname'>header_name</a>() -&gt; &amp;'static <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
<div class='docblock'><p>Returns the name of the header field this belongs to. <a href="../../iron/headers/trait.Header.html#tymethod.header_name">Read more</a></p>
</div><h4 id='method.parse_header' class='method'><code>fn <a href='../../iron/headers/trait.Header.html#tymethod.parse_header' class='fnname'>parse_header</a>(raw: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</a><a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>&gt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;<a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a>,&nbsp;<a class='enum' href='../../iron/error/enum.HttpError.html' title='iron::error::HttpError'>Error</a>&gt;</code></h4>
<div class='docblock'><p>Parse a header from a raw stream of bytes. <a href="../../iron/headers/trait.Header.html#tymethod.parse_header">Read more</a></p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='../../iron/headers/trait.HeaderFormat.html' title='iron::headers::HeaderFormat'>HeaderFormat</a> for <a class='struct' href='../../iron/headers/struct.Cookie.html' title='iron::headers::Cookie'>Cookie</a></code></span><span class='out-of-band'></span></h3>
<div class='impl-items'><h4 id='method.fmt_header' class='method'><code>fn <a href='../../iron/headers/trait.HeaderFormat.html#tymethod.fmt_header' class='fnname'>fmt_header</a>(&amp;self, f: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>,&nbsp;<a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html' title='core::fmt::Error'>Error</a>&gt;</code></h4>
<div class='docblock'><p>Format a header to be output into a TcpStream. <a href="../../iron/headers/trait.HeaderFormat.html#tymethod.fmt_header">Read more</a></p>
</div></div></section>
<section id='search' class="content hidden"></section> <section id='search' class="content hidden"></section>
<section class="footer"></section> <section class="footer"></section>

View file

@ -47,7 +47,7 @@
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>] [<span class='inner'>&#x2212;</span>]
</a> </a>
</span><a id='src-0' class='srclink' href='../src/lazy_static/lib.rs.html#1-137' title='goto source code'>[src]</a></span></h1> </span><a id='src-0' class='srclink' href='../src/lazy_static/lib.rs.html#1-157' title='goto source code'>[src]</a></span></h1>
<div class='docblock'><p>A macro for declaring lazily evaluated statics.</p> <div class='docblock'><p>A macro for declaring lazily evaluated statics.</p>
<p>Using this macro, it is possible to have <code>static</code>s that require code to be <p>Using this macro, it is possible to have <code>static</code>s that require code to be
@ -108,37 +108,13 @@ trait.</p>
<h1 id='implementation-details' class='section-header'><a href='#implementation-details'>Implementation details</a></h1> <h1 id='implementation-details' class='section-header'><a href='#implementation-details'>Implementation details</a></h1>
<p>The <code>Deref</code> implementation uses a hidden static variable that is guarded by a atomic check on each access. On stable Rust, the macro may need to allocate each static on the heap.</p> <p>The <code>Deref</code> implementation uses a hidden static variable that is guarded by a atomic check on each access. On stable Rust, the macro may need to allocate each static on the heap.</p>
</div><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2> </div><h2 id='macros' class='section-header'><a href="#macros">Macros</a></h2>
<table> <table>
<tr class=' module-item'>
<td><a class='mod' href='lazy/index.html'
title='lazy_static::lazy'>lazy</a></td>
<td class='docblock short'>
</td>
</tr></table><h2 id='macros' class='section-header'><a href="#macros">Macros</a></h2>
<table>
<tr class=' module-item'>
<td><a class='macro' href='macro.__lazy_static_create!.html'
title='lazy_static::__lazy_static_create!'>__lazy_static_create!</a></td>
<td class='docblock short'>
</td>
</tr>
<tr class=' module-item'> <tr class=' module-item'>
<td><a class='macro' href='macro.lazy_static!.html' <td><a class='macro' href='macro.lazy_static!.html'
title='lazy_static::lazy_static!'>lazy_static!</a></td> title='lazy_static::lazy_static!'>lazy_static!</a></td>
<td class='docblock short'> <td class='docblock short'>
</td>
</tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
<table>
<tr class=' module-item'>
<td><a class='trait' href='trait.__Deref.html'
title='lazy_static::__Deref'>__Deref</a></td>
<td class='docblock short'>
<p>The <code>Deref</code> trait is used to specify the functionality of dereferencing
operations, like <code>*v</code>.</p>
</td> </td>
</tr></table></section> </tr></table></section>
<section id='search' class="content hidden"></section> <section id='search' class="content hidden"></section>

View file

@ -47,14 +47,14 @@
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>] [<span class='inner'>&#x2212;</span>]
</a> </a>
</span><a id='src-25' class='srclink' href='../src/lazy_static/lib.rs.html#90-137' title='goto source code'>[src]</a></span></h1> </span><a id='src-4' class='srclink' href='../src/lazy_static/lib.rs.html#75-157' title='goto source code'>[src]</a></span></h1>
<pre class='rust macro'> <pre class='rust macro'>
<span class='macro'>macro_rules</span><span class='macro'>!</span> <span class='ident'>lazy_static</span> { <span class='macro'>macro_rules</span><span class='macro'>!</span> <span class='ident'>lazy_static</span> {
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> { ... }; ($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> { ... };
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>pub</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> { ... }; ($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>pub</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> { ... };
(@<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>VIS</span>:<span class='ident'>ident</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> { ... }; (<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>VIS</span>:<span class='ident'>ident</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> { ... };
(@<span class='ident'>MAKE</span> <span class='ident'>TY</span>, <span class='ident'>PUB</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span>) <span class='op'>=&gt;</span> { ... }; (<span class='ident'>MAKE</span> <span class='ident'>TY</span>, <span class='ident'>PUB</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span>) <span class='op'>=&gt;</span> { ... };
(@<span class='ident'>MAKE</span> <span class='ident'>TY</span>, <span class='ident'>PRIV</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span>) <span class='op'>=&gt;</span> { ... }; (<span class='ident'>MAKE</span> <span class='ident'>TY</span>, <span class='ident'>PRIV</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span>) <span class='op'>=&gt;</span> { ... };
() <span class='op'>=&gt;</span> { ... }; () <span class='op'>=&gt;</span> { ... };
}</pre> }</pre>
</section> </section>

View file

@ -1 +1 @@
initSidebarItems({"macro":[["__lazy_static_create!",""],["lazy_static!",""]],"mod":[["lazy",""]],"trait":[["__Deref","The `Deref` trait is used to specify the functionality of dereferencing operations, like `*v`."]]}); initSidebarItems({"macro":[["lazy_static!",""]]});

File diff suppressed because one or more lines are too long

View file

@ -198,6 +198,30 @@
<span id="154">154</span> <span id="154">154</span>
<span id="155">155</span> <span id="155">155</span>
<span id="156">156</span> <span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
</pre><pre class='rust '> </pre><pre class='rust '>
<span class='attribute'>#[<span class='ident'>doc</span>(<span class='ident'>hidden</span>)]</span> <span class='attribute'>#[<span class='ident'>doc</span>(<span class='ident'>hidden</span>)]</span>
<span class='attribute'>#[<span class='ident'>macro_export</span>]</span> <span class='attribute'>#[<span class='ident'>macro_export</span>]</span>
@ -297,6 +321,30 @@
( (
@<span class='ident'>apply_args</span>, @<span class='ident'>apply_args</span>,
<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>reg</span>:<span class='ident'>expr</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>base</span>:<span class='ident'>expr</span>, ( <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>default</span>:<span class='ident'>tt</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>ty</span> , $( <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>rest</span>:<span class='ident'>tt</span> )<span class='op'>*</span> ) <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>reg</span>:<span class='ident'>expr</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>base</span>:<span class='ident'>expr</span>, ( <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>default</span>:<span class='ident'>tt</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>ty</span> , $( <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>rest</span>:<span class='ident'>tt</span> )<span class='op'>*</span> )
) <span class='op'>=&gt;</span> {
<span class='macro'>__graphql__args</span><span class='macro'>!</span>(
@<span class='ident'>apply_args</span>,
<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>reg</span>,
<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>base</span>.<span class='ident'>argument</span>(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>reg</span>.<span class='ident'>arg_with_default</span>::<span class='op'>&lt;</span><span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span><span class='op'>&gt;</span>(
<span class='kw-2'>&amp;</span><span class='macro-nonterminal'>$</span><span class='kw'>crate</span>::<span class='macro-nonterminal'>to_snake_case</span>(<span class='macro'>stringify</span><span class='macro'>!</span>(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span>)),
<span class='kw-2'>&amp;</span><span class='macro'>__graphql__args</span><span class='macro'>!</span>(@<span class='ident'>as_expr</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>default</span>)))
.<span class='ident'>description</span>(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>desc</span>),
( $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>rest</span>)<span class='op'>*</span> ))
};
(
@<span class='ident'>apply_args</span>,
<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>reg</span>:<span class='ident'>expr</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>base</span>:<span class='ident'>expr</span>, ( <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>default</span>:<span class='ident'>tt</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>ty</span> <span class='kw'>as</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>desc</span>:<span class='ident'>expr</span> )
) <span class='op'>=&gt;</span> {
<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>base</span>.<span class='ident'>argument</span>(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>reg</span>.<span class='ident'>arg_with_default</span>::<span class='op'>&lt;</span><span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span><span class='op'>&gt;</span>(
<span class='kw-2'>&amp;</span><span class='macro-nonterminal'>$</span><span class='kw'>crate</span>::<span class='macro-nonterminal'>to_snake_case</span>(<span class='macro'>stringify</span><span class='macro'>!</span>(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span>)),
<span class='kw-2'>&amp;</span><span class='macro'>__graphql__args</span><span class='macro'>!</span>(@<span class='ident'>as_expr</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>default</span>)))
.<span class='ident'>description</span>(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>desc</span>)
};
(
@<span class='ident'>apply_args</span>,
<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>reg</span>:<span class='ident'>expr</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>base</span>:<span class='ident'>expr</span>, ( <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>default</span>:<span class='ident'>tt</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>ty</span> <span class='kw'>as</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>desc</span>:<span class='ident'>expr</span> , $( <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>rest</span>:<span class='ident'>tt</span> )<span class='op'>*</span> )
) <span class='op'>=&gt;</span> { ) <span class='op'>=&gt;</span> {
<span class='macro'>__graphql__args</span><span class='macro'>!</span>( <span class='macro'>__graphql__args</span><span class='macro'>!</span>(
@<span class='ident'>apply_args</span>, @<span class='ident'>apply_args</span>,

View file

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc"> <meta name="generator" content="rustdoc">
<meta name="description" content="Source to the Rust file `/home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-0.2.1/src/lib.rs`."> <meta name="description" content="Source to the Rust file `/home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-0.1.16/src/lib.rs`.">
<meta name="keywords" content="rust, rustlang, rust-lang"> <meta name="keywords" content="rust, rustlang, rust-lang">
<title>lib.rs.html -- source</title> <title>lib.rs.html -- source</title>
@ -179,6 +179,26 @@
<span id="135">135</span> <span id="135">135</span>
<span id="136">136</span> <span id="136">136</span>
<span id="137">137</span> <span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
</pre><pre class='rust '> </pre><pre class='rust '>
<span class='doccomment'>/*! <span class='doccomment'>/*!
A macro for declaring lazily evaluated statics. A macro for declaring lazily evaluated statics.
@ -250,54 +270,74 @@ The `Deref` implementation uses a hidden static variable that is guarded by a at
*/</span> */</span>
<span class='attribute'>#<span class='op'>!</span>[<span class='ident'>cfg_attr</span>(<span class='ident'>feature</span><span class='op'>=</span><span class='string'>&quot;nightly&quot;</span>, <span class='ident'>feature</span>(<span class='ident'>const_fn</span>, <span class='ident'>allow_internal_unstable</span>, <span class='ident'>core_intrinsics</span>))]</span> <span class='attribute'>#<span class='op'>!</span>[<span class='ident'>cfg_attr</span>(<span class='ident'>feature</span><span class='op'>=</span><span class='string'>&quot;nightly&quot;</span>, <span class='ident'>feature</span>(<span class='ident'>const_fn</span>, <span class='ident'>core_intrinsics</span>))]</span>
<span class='attribute'>#<span class='op'>!</span>[<span class='ident'>crate_type</span> <span class='op'>=</span> <span class='string'>&quot;dylib&quot;</span>]</span>
<span class='attribute'>#<span class='op'>!</span>[<span class='ident'>no_std</span>]</span>
<span class='attribute'>#[<span class='ident'>cfg</span>(<span class='ident'>not</span>(<span class='ident'>feature</span><span class='op'>=</span><span class='string'>&quot;nightly&quot;</span>))]</span>
<span class='kw'>pub</span> <span class='kw'>mod</span> <span class='ident'>lazy</span>;
<span class='attribute'>#[<span class='ident'>cfg</span>(<span class='ident'>all</span>(<span class='ident'>feature</span><span class='op'>=</span><span class='string'>&quot;nightly&quot;</span>, <span class='ident'>not</span>(<span class='ident'>feature</span><span class='op'>=</span><span class='string'>&quot;spin_no_std&quot;</span>)))]</span>
<span class='attribute'>#[<span class='ident'>path</span><span class='op'>=</span><span class='string'>&quot;nightly_lazy.rs&quot;</span>]</span>
<span class='kw'>pub</span> <span class='kw'>mod</span> <span class='ident'>lazy</span>;
<span class='attribute'>#[<span class='ident'>cfg</span>(<span class='ident'>all</span>(<span class='ident'>feature</span><span class='op'>=</span><span class='string'>&quot;nightly&quot;</span>, <span class='ident'>feature</span><span class='op'>=</span><span class='string'>&quot;spin_no_std&quot;</span>))]</span>
<span class='attribute'>#[<span class='ident'>path</span><span class='op'>=</span><span class='string'>&quot;core_lazy.rs&quot;</span>]</span>
<span class='kw'>pub</span> <span class='kw'>mod</span> <span class='ident'>lazy</span>;
<span class='kw'>pub</span> <span class='kw'>use</span> <span class='ident'>core</span>::<span class='ident'>ops</span>::<span class='ident'>Deref</span> <span class='kw'>as</span> <span class='ident'>__Deref</span>;
<span class='attribute'>#[<span class='ident'>macro_export</span>]</span> <span class='attribute'>#[<span class='ident'>macro_export</span>]</span>
<span class='attribute'>#[<span class='ident'>cfg_attr</span>(<span class='ident'>feature</span><span class='op'>=</span><span class='string'>&quot;nightly&quot;</span>, <span class='ident'>allow_internal_unstable</span>)]</span>
<span class='macro'>macro_rules</span><span class='macro'>!</span> <span class='ident'>lazy_static</span> { <span class='macro'>macro_rules</span><span class='macro'>!</span> <span class='ident'>lazy_static</span> {
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> { ($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> {
<span class='macro'>lazy_static</span><span class='macro'>!</span>(@<span class='ident'>PRIV</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>)<span class='op'>*</span>); <span class='macro'>lazy_static</span><span class='macro'>!</span>(<span class='ident'>PRIV</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>)<span class='op'>*</span>);
}; };
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>pub</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> { ($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>pub</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> {
<span class='macro'>lazy_static</span><span class='macro'>!</span>(@<span class='ident'>PUB</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>)<span class='op'>*</span>); <span class='macro'>lazy_static</span><span class='macro'>!</span>(<span class='ident'>PUB</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>)<span class='op'>*</span>);
}; };
(@<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>VIS</span>:<span class='ident'>ident</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> { (<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>VIS</span>:<span class='ident'>ident</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>static</span> <span class='kw-2'>ref</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span> : <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>; $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> {
<span class='macro'>lazy_static</span><span class='macro'>!</span>(@<span class='ident'>MAKE</span> <span class='ident'>TY</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>VIS</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>]</span>)<span class='op'>*</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>); <span class='macro'>lazy_static</span><span class='macro'>!</span>(<span class='ident'>MAKE</span> <span class='ident'>TY</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>VIS</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>]</span>)<span class='op'>*</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>);
<span class='kw'>impl</span> <span class='macro-nonterminal'>$</span><span class='kw'>crate</span>::<span class='macro-nonterminal'>__Deref</span> <span class='kw'>for</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span> { <span class='kw'>impl</span> ::<span class='ident'>std</span>::<span class='ident'>ops</span>::<span class='ident'>Deref</span> <span class='kw'>for</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span> {
<span class='kw'>type</span> <span class='ident'>Target</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>; <span class='kw'>type</span> <span class='ident'>Target</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>;
<span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>unsafe_code</span>)]</span>
<span class='kw'>fn</span> <span class='ident'>deref</span><span class='op'>&lt;</span><span class='lifetime'>&#39;a</span><span class='op'>&gt;</span>(<span class='kw-2'>&amp;</span><span class='lifetime'>&#39;a</span> <span class='self'>self</span>) <span class='op'>-&gt;</span> <span class='kw-2'>&amp;</span><span class='lifetime'>&#39;a</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> { <span class='kw'>fn</span> <span class='ident'>deref</span><span class='op'>&lt;</span><span class='lifetime'>&#39;a</span><span class='op'>&gt;</span>(<span class='kw-2'>&amp;</span><span class='lifetime'>&#39;a</span> <span class='self'>self</span>) <span class='op'>-&gt;</span> <span class='kw-2'>&amp;</span><span class='lifetime'>&#39;a</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> {
<span class='attribute'>#[<span class='ident'>inline</span>(<span class='ident'>always</span>)]</span>
<span class='kw'>fn</span> <span class='ident'>__static_ref_initialize</span>() <span class='op'>-&gt;</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> { <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span> }
<span class='kw'>unsafe</span> { <span class='kw'>unsafe</span> {
<span class='attribute'>#[<span class='ident'>inline</span>(<span class='ident'>always</span>)]</span> <span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>sync</span>::{<span class='ident'>Once</span>, <span class='ident'>ONCE_INIT</span>};
<span class='kw'>fn</span> <span class='ident'>__static_ref_initialize</span>() <span class='op'>-&gt;</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> { <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span> }
<span class='attribute'>#[<span class='ident'>inline</span>(<span class='ident'>always</span>)]</span> <span class='attribute'>#[<span class='ident'>inline</span>(<span class='ident'>always</span>)]</span>
<span class='kw'>fn</span> <span class='ident'>require_sync</span><span class='op'>&lt;</span><span class='ident'>T</span>: <span class='ident'>Sync</span><span class='op'>&gt;</span>(_: <span class='kw-2'>&amp;</span><span class='ident'>T</span>) { }
<span class='attribute'>#[<span class='ident'>inline</span>(<span class='ident'>always</span>)]</span>
<span class='attribute'>#[<span class='ident'>cfg</span>(<span class='ident'>feature</span><span class='op'>=</span><span class='string'>&quot;nightly&quot;</span>)]</span>
<span class='kw'>unsafe</span> <span class='kw'>fn</span> <span class='ident'>__stability</span>() <span class='op'>-&gt;</span> <span class='kw-2'>&amp;</span><span class='lifetime'>&#39;static</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> { <span class='kw'>unsafe</span> <span class='kw'>fn</span> <span class='ident'>__stability</span>() <span class='op'>-&gt;</span> <span class='kw-2'>&amp;</span><span class='lifetime'>&#39;static</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> {
<span class='macro'>__lazy_static_create</span><span class='macro'>!</span>(<span class='ident'>LAZY</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>); <span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>cell</span>::<span class='ident'>UnsafeCell</span>;
<span class='ident'>LAZY</span>.<span class='ident'>get</span>(<span class='ident'>__static_ref_initialize</span>)
<span class='kw'>struct</span> <span class='ident'>SyncCell</span>(<span class='ident'>UnsafeCell</span><span class='op'>&lt;</span><span class='prelude-ty'>Option</span><span class='op'>&lt;</span><span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span><span class='op'>&gt;&gt;</span>);
<span class='kw'>unsafe</span> <span class='kw'>impl</span> <span class='ident'>Sync</span> <span class='kw'>for</span> <span class='ident'>SyncCell</span> {}
<span class='kw'>static</span> <span class='ident'>DATA</span>: <span class='ident'>SyncCell</span> <span class='op'>=</span> <span class='ident'>SyncCell</span>(<span class='ident'>UnsafeCell</span>::<span class='ident'>new</span>(<span class='prelude-val'>None</span>));
<span class='kw'>static</span> <span class='ident'>ONCE</span>: <span class='ident'>Once</span> <span class='op'>=</span> <span class='ident'>ONCE_INIT</span>;
<span class='ident'>ONCE</span>.<span class='ident'>call_once</span>(<span class='op'>||</span> {
<span class='op'>*</span><span class='ident'>DATA</span>.<span class='number'>0</span>.<span class='ident'>get</span>() <span class='op'>=</span> <span class='prelude-val'>Some</span>(<span class='ident'>__static_ref_initialize</span>());
});
<span class='kw'>match</span> <span class='op'>*</span><span class='ident'>DATA</span>.<span class='number'>0</span>.<span class='ident'>get</span>() {
<span class='prelude-val'>Some</span>(<span class='kw-2'>ref</span> <span class='ident'>x</span>) <span class='op'>=&gt;</span> <span class='ident'>x</span>,
<span class='prelude-val'>None</span> <span class='op'>=&gt;</span> ::<span class='ident'>std</span>::<span class='ident'>intrinsics</span>::<span class='ident'>unreachable</span>(),
}
} }
<span class='ident'>__stability</span>()
<span class='attribute'>#[<span class='ident'>inline</span>(<span class='ident'>always</span>)]</span>
<span class='attribute'>#[<span class='ident'>cfg</span>(<span class='ident'>not</span>(<span class='ident'>feature</span><span class='op'>=</span><span class='string'>&quot;nightly&quot;</span>))]</span>
<span class='kw'>unsafe</span> <span class='kw'>fn</span> <span class='ident'>__stability</span>() <span class='op'>-&gt;</span> <span class='kw-2'>&amp;</span><span class='lifetime'>&#39;static</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> {
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>mem</span>::<span class='ident'>transmute</span>;
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>boxed</span>::<span class='ident'>Box</span>;
<span class='kw'>static</span> <span class='kw-2'>mut</span> <span class='ident'>DATA</span>: <span class='op'>*</span><span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span> <span class='op'>=</span> <span class='number'>0</span> <span class='kw'>as</span> <span class='op'>*</span><span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>;
<span class='kw'>static</span> <span class='kw-2'>mut</span> <span class='ident'>ONCE</span>: <span class='ident'>Once</span> <span class='op'>=</span> <span class='ident'>ONCE_INIT</span>;
<span class='ident'>ONCE</span>.<span class='ident'>call_once</span>(<span class='op'>||</span> {
<span class='ident'>DATA</span> <span class='op'>=</span> <span class='ident'>transmute</span>::<span class='op'>&lt;</span><span class='ident'>Box</span><span class='op'>&lt;</span><span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span><span class='op'>&gt;</span>, <span class='op'>*</span><span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span><span class='op'>&gt;</span>(
<span class='ident'>Box</span>::<span class='ident'>new</span>(<span class='ident'>__static_ref_initialize</span>()));
});
<span class='kw-2'>&amp;</span><span class='op'>*</span><span class='ident'>DATA</span>
}
<span class='kw'>let</span> <span class='ident'>static_ref</span> <span class='op'>=</span> <span class='ident'>__stability</span>();
<span class='ident'>require_sync</span>(<span class='ident'>static_ref</span>);
<span class='ident'>static_ref</span>
} }
} }
} }
<span class='macro'>lazy_static</span><span class='macro'>!</span>($(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>)<span class='op'>*</span>); <span class='macro'>lazy_static</span><span class='macro'>!</span>($(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>)<span class='op'>*</span>);
}; };
(@<span class='ident'>MAKE</span> <span class='ident'>TY</span>, <span class='ident'>PUB</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span>) <span class='op'>=&gt;</span> { (<span class='ident'>MAKE</span> <span class='ident'>TY</span>, <span class='ident'>PUB</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span>) <span class='op'>=&gt;</span> {
<span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>missing_copy_implementations</span>)]</span> <span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>missing_copy_implementations</span>)]</span>
<span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>non_camel_case_types</span>)]</span> <span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>non_camel_case_types</span>)]</span>
<span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>dead_code</span>)]</span> <span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>dead_code</span>)]</span>
@ -306,7 +346,7 @@ The `Deref` implementation uses a hidden static variable that is guarded by a at
<span class='attribute'>#[<span class='ident'>doc</span>(<span class='ident'>hidden</span>)]</span> <span class='attribute'>#[<span class='ident'>doc</span>(<span class='ident'>hidden</span>)]</span>
<span class='kw'>pub</span> <span class='kw'>static</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span> {<span class='ident'>__private_field</span>: ()}; <span class='kw'>pub</span> <span class='kw'>static</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span> {<span class='ident'>__private_field</span>: ()};
}; };
(@<span class='ident'>MAKE</span> <span class='ident'>TY</span>, <span class='ident'>PRIV</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span>) <span class='op'>=&gt;</span> { (<span class='ident'>MAKE</span> <span class='ident'>TY</span>, <span class='ident'>PRIV</span>, $(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>N</span>:<span class='ident'>ident</span>) <span class='op'>=&gt;</span> {
<span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>missing_copy_implementations</span>)]</span> <span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>missing_copy_implementations</span>)]</span>
<span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>non_camel_case_types</span>)]</span> <span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>non_camel_case_types</span>)]</span>
<span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>dead_code</span>)]</span> <span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>dead_code</span>)]</span>

View file

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc"> <meta name="generator" content="rustdoc">
<meta name="description" content="Source to the Rust file `/home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/traitobject-0.0.1/src/lib.rs`."> <meta name="description" content="Source to the Rust file `/home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/traitobject-0.0.3/src/lib.rs`.">
<meta name="keywords" content="rust, rustlang, rust-lang"> <meta name="keywords" content="rust, rustlang, rust-lang">
<title>lib.rs.html -- source</title> <title>lib.rs.html -- source</title>
@ -71,6 +71,13 @@
<span id="27">27</span> <span id="27">27</span>
<span id="28">28</span> <span id="28">28</span>
<span id="29">29</span> <span id="29">29</span>
<span id="30">30</span>
<span id="31">31</span>
<span id="32">32</span>
<span id="33">33</span>
<span id="34">34</span>
<span id="35">35</span>
<span id="36">36</span>
</pre><pre class='rust '> </pre><pre class='rust '>
<span class='attribute'>#<span class='op'>!</span>[<span class='ident'>cfg_attr</span>(<span class='ident'>test</span>, <span class='ident'>deny</span>(<span class='ident'>warnings</span>))]</span> <span class='attribute'>#<span class='op'>!</span>[<span class='ident'>cfg_attr</span>(<span class='ident'>test</span>, <span class='ident'>deny</span>(<span class='ident'>warnings</span>))]</span>
<span class='attribute'>#<span class='op'>!</span>[<span class='ident'>deny</span>(<span class='ident'>missing_docs</span>)]</span> <span class='attribute'>#<span class='op'>!</span>[<span class='ident'>deny</span>(<span class='ident'>missing_docs</span>)]</span>
@ -101,6 +108,13 @@
<span class='kw'>unsafe</span> { <span class='macro'>assert</span><span class='macro'>!</span>(<span class='kw-2'>&amp;</span><span class='number'>7</span> <span class='op'>==</span> <span class='ident'>mem</span>::<span class='ident'>transmute</span>::<span class='op'>&lt;</span>_, <span class='kw-2'>&amp;</span><span class='ident'>i32</span><span class='op'>&gt;</span>(<span class='ident'>data</span>(<span class='ident'>x</span>))) }; <span class='kw'>unsafe</span> { <span class='macro'>assert</span><span class='macro'>!</span>(<span class='kw-2'>&amp;</span><span class='number'>7</span> <span class='op'>==</span> <span class='ident'>mem</span>::<span class='ident'>transmute</span>::<span class='op'>&lt;</span>_, <span class='kw-2'>&amp;</span><span class='ident'>i32</span><span class='op'>&gt;</span>(<span class='ident'>data</span>(<span class='ident'>x</span>))) };
} }
<span class='doccomment'>/// A trait implemented for all trait objects.</span>
<span class='doccomment'>///</span>
<span class='doccomment'>/// Implementations for all traits in std are provided.</span>
<span class='kw'>pub</span> <span class='kw'>unsafe</span> <span class='kw'>trait</span> <span class='ident'>Trait</span> {}
<span class='kw'>mod</span> <span class='ident'>impls</span>;
</pre> </pre>
</section> </section>
<section id='search' class="content hidden"></section> <section id='search' class="content hidden"></section>

View file

@ -47,11 +47,19 @@
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>] [<span class='inner'>&#x2212;</span>]
</a> </a>
</span><a id='src-0' class='srclink' href='../src/traitobject/lib.rs.html#1-28' title='goto source code'>[src]</a></span></h1> </span><a id='src-0' class='srclink' href='../src/traitobject/lib.rs.html#1-35' title='goto source code'>[src]</a></span></h1>
<div class='docblock'> <div class='docblock'>
<h1 id='traitobject' class='section-header'><a href='#traitobject'>traitobject</a></h1> <h1 id='traitobject' class='section-header'><a href='#traitobject'>traitobject</a></h1>
<p>Unsafe helpers for working with raw TraitObjects.</p> <p>Unsafe helpers for working with raw TraitObjects.</p>
</div><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2> </div><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
<table>
<tr class=' module-item'>
<td><a class='trait' href='trait.Trait.html'
title='traitobject::Trait'>Trait</a></td>
<td class='docblock short'>
<p>A trait implemented for all trait objects.</p>
</td>
</tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table> <table>
<tr class=' module-item'> <tr class=' module-item'>
<td><a class='fn' href='fn.data.html' <td><a class='fn' href='fn.data.html'

View file

@ -1 +1 @@
initSidebarItems({"fn":[["data","Get the data pointer from this trait object."],["data_mut","Get the data pointer from this trait object, mutably."]]}); initSidebarItems({"fn":[["data","Get the data pointer from this trait object."],["data_mut","Get the data pointer from this trait object, mutably."]],"trait":[["Trait","A trait implemented for all trait objects."]]});