<preclass='rust struct'>pub struct Cookie(pub <aclass='struct'href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html'title='collections::vec::Vec'>Vec</a><<aclass='struct'href='../../iron/headers/struct.Cookie.html'title='iron::headers::Cookie'>Cookie</a>>);</pre><divclass='docblock'><p><code>Cookie</code> header, defined in <ahref="http://tools.ietf.org/html/rfc6265#section-5.4">RFC6265</a></p>
<p>If the user agent does attach a Cookie header field to an HTTP
request, the user agent must send the cookie-string
as the value of the header field.</p>
<p>When the user agent generates an HTTP request, the user agent MUST NOT
<divclass='docblock'><p>Extracts all cookies from <code>CookieJar</code> and creates Cookie header.
Useful for clients.</p>
</div></div><h2id='deref-methods'>Methods from <aclass='trait'href='https://doc.rust-lang.org/nightly/core/ops/trait.Deref.html'title='core::ops::Deref'>Deref</a><Target=<aclass='struct'href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html'title='collections::vec::Vec'>Vec</a><<aclass='struct'href='../../iron/headers/struct.Cookie.html'title='iron::headers::Cookie'>Cookie</a>>></h2><divclass='impl-items'><h4id='method.capacity'class='method'><code>fn <ahref='#method.capacity'class='fnname'>capacity</a>(&self) -><aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Returns the number of elements the vector can hold without
</div><h4id='method.reserve'class='method'><code>fn <ahref='#method.reserve'class='fnname'>reserve</a>(&mut self, additional: <aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Reserves capacity for at least <code>additional</code> more elements to be inserted
in the given <code>Vec<T></code>. The collection may reserve more space to avoid
</div><h4id='method.reserve_exact'class='method'><code>fn <ahref='#method.reserve_exact'class='fnname'>reserve_exact</a>(&mut self, additional: <aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Reserves the minimum capacity for exactly <code>additional</code> more elements to
be inserted in the given <code>Vec<T></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>
</div><h4id='method.shrink_to_fit'class='method'><code>fn <ahref='#method.shrink_to_fit'class='fnname'>shrink_to_fit</a>(&mut self)</code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='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>
</div><h4id='method.into_boxed_slice'class='method'><code>fn <ahref='#method.into_boxed_slice'class='fnname'>into_boxed_slice</a>(self) -><aclass='struct'href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html'title='alloc::boxed::Box'>Box</a><<aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a>T<aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>></code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Converts the vector into Box<[T]>.</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
</div><h4id='method.truncate'class='method'><code>fn <ahref='#method.truncate'class='fnname'>truncate</a>(&mut self, len: <aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Shortens the vector, keeping the first <code>len</code> elements and dropping
the rest.</p>
<p>If <code>len</code> is greater than the vector's current length, this has no
effect.</p>
<p>The <ahref="#method.drain"><code>drain</code></a> method can emulate <code>truncate</code>, but causes the excess
</div><h4id='method.as_slice'class='method'><code>fn <ahref='#method.as_slice'class='fnname'>as_slice</a>(&self) -><aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[T]</a></code><divclass='since'title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<divclass='docblock'><p>Extracts a slice containing the entire vector.</p>
</div><h4id='method.as_mut_slice'class='method'><code>fn <ahref='#method.as_mut_slice'class='fnname'>as_mut_slice</a>(&mut self) -><aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [T]</a></code><divclass='since'title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<divclass='docblock'><p>Extracts a mutable slice of the entire vector.</p>
</div><h4id='method.set_len'class='method'><code>unsafe fn <ahref='#method.set_len'class='fnname'>set_len</a>(&mut self, len: <aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='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
</div><h4id='method.push'class='method'><code>fn <ahref='#method.push'class='fnname'>push</a>(&mut self, value: T)</code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Appends an element to the back of a collection.</p>
</div><h4id='method.pop'class='method'><code>fn <ahref='#method.pop'class='fnname'>pop</a>(&mut self) -><aclass='enum'href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html'title='core::option::Option'>Option</a><T></code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Removes the last element from a vector and returns it, or <code>None</code> if it
</div><h4id='method.append'class='method'><code>fn <ahref='#method.append'class='fnname'>append</a>(&mut self, other: &mut <aclass='struct'href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html'title='collections::vec::Vec'>Vec</a><T>)</code><divclass='since'title='Stable since Rust version 1.4.0'>1.4.0</div></h4>
<divclass='docblock'><p>Moves all the elements of <code>other</code> into <code>Self</code>, leaving <code>other</code> empty.</p>
</div><h4id='method.clear'class='method'><code>fn <ahref='#method.clear'class='fnname'>clear</a>(&mut self)</code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Clears the vector, removing all values.</p>
</div><h4id='method.len'class='method'><code>fn <ahref='#method.len'class='fnname'>len</a>(&self) -><aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Returns the number of elements in the vector.</p>
</div><h4id='method.is_empty'class='method'><code>fn <ahref='#method.is_empty'class='fnname'>is_empty</a>(&self) -><aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p>
</div><h4id='method.split_off'class='method'><code>fn <ahref='#method.split_off'class='fnname'>split_off</a>(&mut self, at: <aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -><aclass='struct'href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html'title='collections::vec::Vec'>Vec</a><T></code><divclass='since'title='Stable since Rust version 1.4.0'>1.4.0</div></h4>
<divclass='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>
</div><h4id='method.extend_from_slice'class='method'><code>fn <ahref='#method.extend_from_slice'class='fnname'>extend_from_slice</a>(&mut self, other: <aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[T]</a>)</code><divclass='since'title='Stable since Rust version 1.6.0'>1.6.0</div></h4>
<divclass='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
</div></div><divclass='impl-items'><h4id='method.dedup'class='method'><code>fn <ahref='#method.dedup'class='fnname'>dedup</a>(&mut self)</code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Removes consecutive repeated elements in the vector.</p>
<p>If the vector is sorted, this removes all duplicates.</p>
</div></div><h2id='implementations'>Trait Implementations</h2><h3class='impl'><spanclass='in-band'><code>impl <aclass='trait'href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html'title='core::fmt::Debug'>Debug</a> for <aclass='struct'href='../../iron/headers/struct.Cookie.html'title='iron::headers::Cookie'>Cookie</a></code></span><spanclass='out-of-band'></span></h3>
</div></div><h3class='impl'><spanclass='in-band'><code>impl <aclass='trait'href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html'title='core::cmp::PartialEq'>PartialEq</a><<aclass='struct'href='../../iron/headers/struct.Cookie.html'title='iron::headers::Cookie'>Cookie</a>> for <aclass='struct'href='../../iron/headers/struct.Cookie.html'title='iron::headers::Cookie'>Cookie</a></code></span><spanclass='out-of-band'></span></h3>
<divclass='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div></div><h3class='impl'><spanclass='in-band'><code>impl <aclass='trait'href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html'title='core::clone::Clone'>Clone</a> for <aclass='struct'href='../../iron/headers/struct.Cookie.html'title='iron::headers::Cookie'>Cookie</a></code></span><spanclass='out-of-band'></span></h3>
<divclass='docblock'><p>Returns a copy of the value. <ahref="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4id='method.clone_from'class='method'><code>fn <ahref='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from'class='fnname'>clone_from</a>(&mut self, source: &Self)</code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Performs copy-assignment from <code>source</code>. <ahref="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3class='impl'><spanclass='in-band'><code>impl <aclass='trait'href='https://doc.rust-lang.org/nightly/core/ops/trait.Deref.html'title='core::ops::Deref'>Deref</a> for <aclass='struct'href='../../iron/headers/struct.Cookie.html'title='iron::headers::Cookie'>Cookie</a></code></span><spanclass='out-of-band'></span></h3>
<divclass='docblock'><p>The method called to dereference a value</p>
</div></div><h3class='impl'><spanclass='in-band'><code>impl <aclass='trait'href='https://doc.rust-lang.org/nightly/core/ops/trait.DerefMut.html'title='core::ops::DerefMut'>DerefMut</a> for <aclass='struct'href='../../iron/headers/struct.Cookie.html'title='iron::headers::Cookie'>Cookie</a></code></span><spanclass='out-of-band'></span></h3>
</div><h3class='impl'><spanclass='in-band'><code>impl <aclass='trait'href='../../iron/headers/trait.Header.html'title='iron::headers::Header'>Header</a> for <aclass='struct'href='../../iron/headers/struct.Cookie.html'title='iron::headers::Cookie'>Cookie</a></code></span><spanclass='out-of-band'></span></h3>
<divclass='docblock'><p>Returns the name of the header field this belongs to. <ahref="../../iron/headers/trait.Header.html#tymethod.header_name">Read more</a></p>
<divclass='docblock'><p>Parse a header from a raw stream of bytes. <ahref="../../iron/headers/trait.Header.html#tymethod.parse_header">Read more</a></p>
</div></div><h3class='impl'><spanclass='in-band'><code>impl <aclass='trait'href='../../iron/headers/trait.HeaderFormat.html'title='iron::headers::HeaderFormat'>HeaderFormat</a> for <aclass='struct'href='../../iron/headers/struct.Cookie.html'title='iron::headers::Cookie'>Cookie</a></code></span><spanclass='out-of-band'></span></h3>
<divclass='docblock'><p>Format a header to be output into a TcpStream. <ahref="../../iron/headers/trait.HeaderFormat.html#tymethod.fmt_header">Read more</a></p>