<preclass='rust struct'>pub struct UserAgent(pub <aclass='struct'href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html'title='collections::string::String'>String</a>);</pre><divclass='docblock'><p><code>User-Agent</code> header, defined in
</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/string/struct.String.html'title='collections::string::String'>String</a>></h2><divclass='impl-items'><h4id='method.into_bytes'class='method'><code>fn <ahref='#method.into_bytes'class='fnname'>into_bytes</a>(self) -><aclass='struct'href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html'title='collections::vec::Vec'>Vec</a><<aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>></code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Converts a <code>String</code> into a byte vector.</p>
<p>This consumes the <code>String</code>, so we do not need to copy its contents.</p>
</div><h4id='method.as_str'class='method'><code>fn <ahref='#method.as_str'class='fnname'>as_str</a>(&self) ->&<aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code><divclass='since'title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<divclass='docblock'><p>Extracts a string slice containing the entire string.</p>
</div><h4id='method.as_mut_str'class='method'><code>fn <ahref='#method.as_mut_str'class='fnname'>as_mut_str</a>(&mut self) ->&mut <aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code><divclass='since'title='Stable since Rust version 1.7.0'>1.7.0</div></h4>
<divclass='docblock'><p>Extracts a string slice containing the entire string.</p>
</div><h4id='method.push_str'class='method'><code>fn <ahref='#method.push_str'class='fnname'>push_str</a>(&mut self, string: &<aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>)</code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Appends a given string slice onto the end of this <code>String</code>.</p>
</div><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 this <code>String</code>'s capacity, in bytes.</p>
</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>Ensures that this <code>String</code>'s capacity is at least <code>additional</code> bytes
larger than its length.</p>
<p>The capacity may be increased by more than <code>additional</code> bytes if it
chooses, to prevent frequent reallocations.</p>
<p>If you do not want this "at least" behavior, see the <ahref="#method.reserve_exact"><code>reserve_exact()</code></a>
</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>Ensures that this <code>String</code>'s capacity is <code>additional</code> bytes
larger than its length.</p>
<p>Consider using the <ahref="#method.reserve"><code>reserve()</code></a> method unless you absolutely know
</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 this <code>String</code> to match its length.</p>
</div><h4id='method.push'class='method'><code>fn <ahref='#method.push'class='fnname'>push</a>(&mut self, ch: <aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.char.html'>char</a>)</code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Appends the given <code>char</code> to the end of this <code>String</code>.</p>
</div><h4id='method.as_bytes'class='method'><code>fn <ahref='#method.as_bytes'class='fnname'>as_bytes</a>(&self) -><aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><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>Returns a byte slice of this <code>String</code>'s contents.</p>
</div><h4id='method.truncate'class='method'><code>fn <ahref='#method.truncate'class='fnname'>truncate</a>(&mut self, new_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 this <code>String</code> to the specified length.</p>
<p>If <code>new_len</code> is greater than the string's current length, this has no
</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><<aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.char.html'>char</a>></code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Removes the last character from the string buffer and returns it.</p>
<p>Returns <code>None</code> if this <code>String</code> is empty.</p>
</div><h4id='method.remove'class='method'><code>fn <ahref='#method.remove'class='fnname'>remove</a>(&mut self, idx: <aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -><aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.char.html'>char</a></code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Removes a <code>char</code> from this <code>String</code> at a byte position and returns it.</p>
<p>This is an <code>O(n)</code> operation, as it requires copying every element in the
</div><h4id='method.as_mut_vec'class='method'><code>unsafe fn <ahref='#method.as_mut_vec'class='fnname'>as_mut_vec</a>(&mut self) ->&mut <aclass='struct'href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html'title='collections::vec::Vec'>Vec</a><<aclass='primitive'href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>></code><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<divclass='docblock'><p>Returns a mutable reference to the contents of this <code>String</code>.</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 length of this <code>String</code>, in bytes.</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 this <code>String</code> has a length of zero.</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>Truncates this <code>String</code>, removing all contents.</p>
<p>While this means the <code>String</code> will have a length of zero, it does not
<spanclass='kw'>let</span><spanclass='kw-2'>mut</span><spanclass='ident'>s</span><spanclass='op'>=</span><spanclass='ident'>String</span>::<spanclass='ident'>from</span>(<spanclass='string'>"α is alpha, β is beta"</span>);
</div><h4id='method.into_boxed_str'class='method'><code>fn <ahref='#method.into_boxed_str'class='fnname'>into_boxed_str</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.str.html'>str</a>></code><divclass='since'title='Stable since Rust version 1.4.0'>1.4.0</div></h4>
<divclass='docblock'><p>Converts this <code>String</code> into a <code>Box<str></code>.</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/cmp/trait.PartialEq.html'title='core::cmp::PartialEq'>PartialEq</a><<aclass='struct'href='../../iron/headers/struct.UserAgent.html'title='iron::headers::UserAgent'>UserAgent</a>> for <aclass='struct'href='../../iron/headers/struct.UserAgent.html'title='iron::headers::UserAgent'>UserAgent</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>
<divclass='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><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.UserAgent.html'title='iron::headers::UserAgent'>UserAgent</a></code></span><spanclass='out-of-band'></span></h3>
<divclass='docblock'><p>Formats the value using the given formatter.</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.UserAgent.html'title='iron::headers::UserAgent'>UserAgent</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.UserAgent.html'title='iron::headers::UserAgent'>UserAgent</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.UserAgent.html'title='iron::headers::UserAgent'>UserAgent</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.UserAgent.html'title='iron::headers::UserAgent'>UserAgent</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.UserAgent.html'title='iron::headers::UserAgent'>UserAgent</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>
</div></div><h3class='impl'><spanclass='in-band'><code>impl <aclass='trait'href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html'title='core::fmt::Display'>Display</a> for <aclass='struct'href='../../iron/headers/struct.UserAgent.html'title='iron::headers::UserAgent'>UserAgent</a></code></span><spanclass='out-of-band'></span></h3>