1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-01-19 22:24:40 +01:00
actix-web/actix_http/header/map/struct.HeaderMap.html

332 lines
79 KiB
HTML
Raw Normal View History

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A multi-map of HTTP headers."><title>HeaderMap in actix_http::header::map - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="actix_http" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../../actix_http/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../actix_http/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../../actix_http/index.html">actix_http</a><span class="version">3.7.0</span></h2></div><h2 class="location"><a href="#">HeaderMap</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.append">append</a></li><li><a href="#method.capacity">capacity</a></li><li><a href="#method.clear">clear</a></li><li><a href="#method.contains_key">contains_key</a></li><li><a href="#method.drain">drain</a></li><li><a href="#method.get">get</a></li><li><a href="#method.get_all">get_all</a></li><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.insert">insert</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.keys">keys</a></li><li><a href="#method.len">len</a></li><li><a href="#method.len_keys">len_keys</a></li><li><a href="#method.new">new</a></li><li><a href="#method.remove">remove</a></li><li><a href="#method.reserve">reserve</a></li><li><a href="#method.retain">retain</a></li><li><a href="#method.with_capacity">with_capacity</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-HeaderMap">Clone</a></li><li><a href="#impl-Debug-for-HeaderMap">Debug</a></li><li><a href="#impl-Default-for-HeaderMap">Default</a></li><li><a href="#impl-From%3C%26HeaderMap%3E-for-HeaderMap">From&lt;&amp;HeaderMap&gt;</a></li><li><a href="#impl-From%3CHeaderMap%3E-for-HeaderMap">From&lt;HeaderMap&gt;</a></li><li><a href="#impl-From%3CHeaderMap%3E-for-HeaderMap-1">From&lt;HeaderMap&gt;</a></li><li><a href="#impl-IntoIterator-for-%26HeaderMap">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-HeaderMap">IntoIterator</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Fr
<p><code>HeaderMap</code> is a “multi-map” of <a href="../struct.HeaderName.html" title="struct actix_http::header::HeaderName"><code>HeaderName</code></a> to one or more <a href="../struct.HeaderValue.html" title="struct actix_http::header::HeaderValue"><code>HeaderValue</code></a>s.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_http::header::{<span class="self">self</span>, HeaderMap, HeaderValue};
<span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
map.insert(header::CONTENT_TYPE, HeaderValue::from_static(<span class="string">"text/plain"</span>));
map.insert(header::ORIGIN, HeaderValue::from_static(<span class="string">"example.com"</span>));
<span class="macro">assert!</span>(map.contains_key(header::CONTENT_TYPE));
<span class="macro">assert!</span>(map.contains_key(header::ORIGIN));
<span class="kw">let </span><span class="kw-2">mut </span>removed = map.remove(header::ORIGIN);
<span class="macro">assert_eq!</span>(removed.next().unwrap(), <span class="string">"example.com"</span>);
<span class="macro">assert!</span>(!map.contains_key(header::ORIGIN));</code></pre></div>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-HeaderMap" class="impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#71-615">source</a><a href="#impl-HeaderMap" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#84-86">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -&gt; Self</h4></section></summary><div class="docblock"><p>Create an empty <code>HeaderMap</code>.</p>
<p>The map will be created without any capacity; this function will not allocate.</p>
<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>map = HeaderMap::new();
<span class="macro">assert!</span>(map.is_empty());
<span class="macro">assert_eq!</span>(<span class="number">0</span>, map.capacity());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.with_capacity" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#101-105">source</a><h4 class="code-header">pub fn <a href="#method.with_capacity" class="fn">with_capacity</a>(capacity: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Create an empty <code>HeaderMap</code> with the specified capacity.</p>
<p>The map will be able to hold at least <code>capacity</code> elements without needing to reallocate.
If <code>capacity</code> is 0, the map will be created without allocating.</p>
<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>map = HeaderMap::with_capacity(<span class="number">16</span>);
<span class="macro">assert!</span>(map.is_empty());
<span class="macro">assert!</span>(map.capacity() &gt;= <span class="number">16</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.len" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#152-154">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of values stored in the map.</p>
<p>See also: <a href="struct.HeaderMap.html#method.len_keys" title="method actix_http::header::map::HeaderMap::len_keys"><code>len_keys</code></a>.</p>
<h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
<span class="macro">assert_eq!</span>(map.len(), <span class="number">0</span>);
map.insert(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/plain"</span>));
map.insert(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=1"</span>));
<span class="macro">assert_eq!</span>(map.len(), <span class="number">2</span>);
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"two=2"</span>));
<span class="macro">assert_eq!</span>(map.len(), <span class="number">3</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.len_keys" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#173-175">source</a><h4 class="code-header">pub fn <a href="#method.len_keys" class="fn">len_keys</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of <em>keys</em> stored in the map.</p>
<p>The number of values stored will be at least this number. See also: <a href="struct.HeaderMap.html#method.len" title="method actix_http::header::map::HeaderMap::len"><code>Self::len</code></a>.</p>
<h5 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
<span class="macro">assert_eq!</span>(map.len_keys(), <span class="number">0</span>);
map.insert(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/plain"</span>));
map.insert(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=1"</span>));
<span class="macro">assert_eq!</span>(map.len_keys(), <span class="number">2</span>);
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"two=2"</span>));
<span class="macro">assert_eq!</span>(map.len_keys(), <span class="number">2</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#188-190">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if the map contains no elements.</p>
<h5 id="examples-5"><a class="doc-anchor" href="#examples-5">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
<span class="macro">assert!</span>(map.is_empty());
map.insert(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/plain"</span>));
<span class="macro">assert!</span>(!map.is_empty());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clear" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#208-210">source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fn">clear</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Clears the map, removing all name-value pairs.</p>
<p>Keeps the allocated memory for reuse.</p>
<h5 id="examples-6"><a class="doc-anchor" href="#examples-6">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
map.insert(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/plain"</span>));
map.insert(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=1"</span>));
<span class="macro">assert_eq!</span>(map.len(), <span class="number">2</span>);
map.clear();
<span class="macro">assert!</span>(map.is_empty());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#248-250">source</a><h4 class="code-header">pub fn <a href="#method.get" class="fn">get</a>(&amp;self, key: impl <a class="trait" href="../trait.AsHeaderName.html" title="trait actix_http::header::AsHeaderName">AsHeaderName</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../struct.HeaderValue.html" title="struct actix_http::header::HeaderValue">HeaderValue</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a reference to the <em>first</em> value associated with a header name.</p>
<p>Returns <code>None</code> if there is no value associated with the key.</p>
<p>Even when multiple values are associated with the key, the “first” one is returned but is
not guaranteed to be chosen with any particular order; though, the returned item will be
consistent for each call to <code>get</code> if the map has not changed.</p>
<p>See also: <a href="struct.HeaderMap.html#method.get_all" title="method actix_http::header::map::HeaderMap::get_all"><code>get_all</code></a>.</p>
<h5 id="examples-7"><a class="doc-anchor" href="#examples-7">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
map.insert(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=1"</span>));
<span class="kw">let </span>cookie = map.get(header::SET_COOKIE).unwrap();
<span class="macro">assert_eq!</span>(cookie, <span class="string">"one=1"</span>);
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"two=2"</span>));
<span class="macro">assert_eq!</span>(map.get(header::SET_COOKIE).unwrap(), <span class="string">"one=1"</span>);
<span class="macro">assert_eq!</span>(map.get(header::SET_COOKIE), map.get(<span class="string">"set-cookie"</span>));
<span class="macro">assert_eq!</span>(map.get(header::SET_COOKIE), map.get(<span class="string">"Set-Cookie"</span>));
<span class="macro">assert!</span>(map.get(header::HOST).is_none());
<span class="macro">assert!</span>(map.get(<span class="string">"INVALID HEADER NAME"</span>).is_none());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_mut" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#278-283">source</a><h4 class="code-header">pub fn <a href="#method.get_mut" class="fn">get_mut</a>(&amp;mut self, key: impl <a class="trait" href="../trait.AsHeaderName.html" title="trait actix_http::header::AsHeaderName">AsHeaderName</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;mut <a class="struct" href="../struct.HeaderValue.html" title="struct actix_http::header::HeaderValue">HeaderValue</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a mutable reference to the <em>first</em> value associated a header name.</p>
<p>Returns <code>None</code> if there is no value associated with the key.</p>
<p>Even when multiple values are associated with the key, the “first” one is returned but is
not guaranteed to be chosen with any particular order; though, the returned item will be
consistent for each call to <code>get_mut</code> if the map has not changed.</p>
<p>See also: <a href="struct.HeaderMap.html#method.get_all" title="method actix_http::header::map::HeaderMap::get_all"><code>get_all</code></a>.</p>
<h5 id="examples-8"><a class="doc-anchor" href="#examples-8">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
map.insert(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=1"</span>));
<span class="kw">let </span><span class="kw-2">mut </span>cookie = map.get_mut(header::SET_COOKIE).unwrap();
<span class="macro">assert_eq!</span>(cookie, <span class="string">"one=1"</span>);
<span class="kw-2">*</span>cookie = HeaderValue::from_static(<span class="string">"three=3"</span>);
<span class="macro">assert_eq!</span>(map.get(header::SET_COOKIE).unwrap(), <span class="string">"three=3"</span>);
<span class="macro">assert!</span>(map.get(header::HOST).is_none());
<span class="macro">assert!</span>(map.get(<span class="string">"INVALID HEADER NAME"</span>).is_none());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_all" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#307-312">source</a><h4 class="code-header">pub fn <a href="#method.get_all" class="fn">get_all</a>(&amp;self, key: impl <a class="trait" href="../trait.AsHeaderName.html" title="trait actix_http::header::AsHeaderName">AsHeaderName</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/slice/iter/struct.Iter.html" title="struct core::slice::iter::Iter">Iter</a>&lt;'_, <a class="struct" href="../struct.HeaderValue.html" title="struct actix_http::header::HeaderValue">HeaderValue</a>&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over all values associated with a header name.</p>
<p>The returned iterator does not incur any allocations and will yield no items if there are no
values associated with the key. Iteration order is guaranteed to be the same as
insertion order.</p>
<h5 id="examples-9"><a class="doc-anchor" href="#examples-9">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
<span class="kw">let </span><span class="kw-2">mut </span>none_iter = map.get_all(header::ORIGIN);
<span class="macro">assert!</span>(none_iter.next().is_none());
map.insert(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=1"</span>));
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"two=2"</span>));
<span class="kw">let </span><span class="kw-2">mut </span>set_cookies_iter = map.get_all(header::SET_COOKIE);
<span class="macro">assert_eq!</span>(set_cookies_iter.next().unwrap(), <span class="string">"one=1"</span>);
<span class="macro">assert_eq!</span>(set_cookies_iter.next().unwrap(), <span class="string">"two=2"</span>);
<span class="macro">assert!</span>(set_cookies_iter.next().is_none());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.contains_key" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#329-335">source</a><h4 class="code-header">pub fn <a href="#method.contains_key" class="fn">contains_key</a>(&amp;self, key: impl <a class="trait" href="../trait.AsHeaderName.html" title="trait actix_http::header::AsHeaderName">AsHeaderName</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the map contains a value for the specified key.</p>
<p>Invalid header names will simply return false.</p>
<h5 id="examples-10"><a class="doc-anchor" href="#examples-10">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
<span class="macro">assert!</span>(!map.contains_key(header::ACCEPT));
map.insert(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/plain"</span>));
<span class="macro">assert!</span>(map.contains_key(header::ACCEPT));</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.insert" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#371-374">source</a><h4 class="code-header">pub fn <a href="#method.insert" class="fn">insert</a>(&amp;mut self, key: <a class="struct" href="../struct.HeaderName.html" title="struct actix_http::header::HeaderName">HeaderName</a>, val: <a class="struct" href="../struct.HeaderValue.html" title="struct actix_http::header::HeaderValue">HeaderValue</a>) -&gt; <a class="struct" href="struct.Removed.html" title="struct actix_http::header::map::Removed">Removed</a> <a href="#" class="tooltip" data-notable-ty="Removed"></a></h4></section></summary><div class="docblock"><p>Inserts (overrides) a name-value pair in the map.</p>
<p>If the map already contained this key, the new value is associated with the key and all
previous values are removed and returned as a <code>Removed</code> iterator. The key is not updated;
this matters for types that can be <code>==</code> without being identical.</p>
<h5 id="examples-11"><a class="doc-anchor" href="#examples-11">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
map.insert(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/plain"</span>));
<span class="macro">assert!</span>(map.contains_key(header::ACCEPT));
<span class="macro">assert_eq!</span>(map.len(), <span class="number">1</span>);
<span class="kw">let </span><span class="kw-2">mut </span>removed = map.insert(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/csv"</span>));
<span class="macro">assert_eq!</span>(removed.next().unwrap(), <span class="string">"text/plain"</span>);
<span class="macro">assert!</span>(removed.next().is_none());
<span class="macro">assert_eq!</span>(map.len(), <span class="number">1</span>);</code></pre></div>
<p>A convenience method is provided on the returned iterator to check if the insertion replaced
any values.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
<span class="kw">let </span>removed = map.insert(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/plain"</span>));
<span class="macro">assert!</span>(removed.is_empty());
<span class="kw">let </span>removed = map.insert(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/html"</span>));
<span class="macro">assert!</span>(!removed.is_empty());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.append" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#396-405">source</a><h4 class="code-header">pub fn <a href="#method.append" class="fn">append</a>(&amp;mut self, key: <a class="struct" href="../struct.HeaderName.html" title="struct actix_http::header::HeaderName">HeaderName</a>, value: <a class="struct" href="../struct.HeaderValue.html" title="struct actix_http::header::HeaderValue">HeaderValue</a>)</h4></section></summary><div class="docblock"><p>Appends a name-value pair to the map.</p>
<p>If the map already contained this key, the new value is added to the list of values
currently associated with the key. The key is not updated; this matters for types that can
be <code>==</code> without being identical.</p>
<h5 id="examples-12"><a class="doc-anchor" href="#examples-12">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
map.append(header::HOST, HeaderValue::from_static(<span class="string">"example.com"</span>));
<span class="macro">assert_eq!</span>(map.len(), <span class="number">1</span>);
map.append(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/csv"</span>));
<span class="macro">assert_eq!</span>(map.len(), <span class="number">2</span>);
map.append(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/html"</span>));
<span class="macro">assert_eq!</span>(map.len(), <span class="number">3</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.remove" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#443-451">source</a><h4 class="code-header">pub fn <a href="#method.remove" class="fn">remove</a>(&amp;mut self, key: impl <a class="trait" href="../trait.AsHeaderName.html" title="trait actix_http::header::AsHeaderName">AsHeaderName</a>) -&gt; <a class="struct" href="struct.Removed.html" title="struct actix_http::header::map::Removed">Removed</a> <a href="#" class="tooltip" data-notable-ty="Removed"></a></h4></section></summary><div class="docblock"><p>Removes all headers for a particular header name from the map.</p>
<p>Providing an invalid header names (as a string argument) will have no effect and return
without error.</p>
<h5 id="examples-13"><a class="doc-anchor" href="#examples-13">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=1"</span>));
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=2"</span>));
<span class="macro">assert_eq!</span>(map.len(), <span class="number">2</span>);
<span class="kw">let </span><span class="kw-2">mut </span>removed = map.remove(header::SET_COOKIE);
<span class="macro">assert_eq!</span>(removed.next().unwrap(), <span class="string">"one=1"</span>);
<span class="macro">assert_eq!</span>(removed.next().unwrap(), <span class="string">"one=2"</span>);
<span class="macro">assert!</span>(removed.next().is_none());
<span class="macro">assert!</span>(map.is_empty());</code></pre></div>
<p>A convenience method is provided on the returned iterator to check if the <code>remove</code> call
actually removed any values.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
<span class="kw">let </span>removed = map.remove(<span class="string">"accept"</span>);
<span class="macro">assert!</span>(removed.is_empty());
map.insert(header::ACCEPT, HeaderValue::from_static(<span class="string">"text/html"</span>));
<span class="kw">let </span>removed = map.remove(<span class="string">"accept"</span>);
<span class="macro">assert!</span>(!removed.is_empty());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.capacity" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#468-470">source</a><h4 class="code-header">pub fn <a href="#method.capacity" class="fn">capacity</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of single-value headers the map can hold without needing to reallocate.</p>
<p>Since this is a multi-value map, the actual capacity is much larger when considering
each header name can be associated with an arbitrary number of values. The effect is that
the size of <code>len</code> may be greater than <code>capacity</code> since it counts all the values.
Conversely, <a href="struct.HeaderMap.html#method.len_keys" title="method actix_http::header::map::HeaderMap::len_keys"><code>len_keys</code></a> will never be larger than capacity.</p>
<h5 id="examples-14"><a class="doc-anchor" href="#examples-14">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>map = HeaderMap::with_capacity(<span class="number">16</span>);
<span class="macro">assert!</span>(map.is_empty());
<span class="macro">assert!</span>(map.capacity() &gt;= <span class="number">16</span>);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#491-493">source</a><h4 class="code-header">pub fn <a href="#method.reserve" class="fn">reserve</a>(&amp;mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Reserves capacity for at least <code>additional</code> more headers to be inserted in the map.</p>
<p>The header map may reserve more space to avoid frequent reallocations. Additional capacity
only considers single-value headers.</p>
<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
<p>Panics if the new allocation size overflows usize.</p>
<h5 id="examples-15"><a class="doc-anchor" href="#examples-15">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::with_capacity(<span class="number">2</span>);
<span class="macro">assert!</span>(map.capacity() &gt;= <span class="number">2</span>);
map.reserve(<span class="number">100</span>);
<span class="macro">assert!</span>(map.capacity() &gt;= <span class="number">102</span>);
<span class="macro">assert!</span>(map.is_empty());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.iter" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#523-525">source</a><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&amp;self) -&gt; <a class="struct" href="struct.Iter.html" title="struct actix_http::header::map::Iter">Iter</a>&lt;'_&gt; <a href="#" class="tooltip" data-notable-ty="Iter&lt;&#39;_&gt;"></a></h4></section></summary><div class="docblock"><p>An iterator over all name-value pairs.</p>
<p>Names will be yielded for each associated value. So, if a key has 3 associated values, it
will be yielded 3 times. The iteration order should be considered arbitrary.</p>
<h5 id="examples-16"><a class="doc-anchor" href="#examples-16">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
<span class="kw">let </span><span class="kw-2">mut </span>iter = map.iter();
<span class="macro">assert!</span>(iter.next().is_none());
map.append(header::HOST, HeaderValue::from_static(<span class="string">"duck.com"</span>));
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=1"</span>));
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"two=2"</span>));
<span class="kw">let </span><span class="kw-2">mut </span>iter = map.iter();
<span class="macro">assert!</span>(iter.next().is_some());
<span class="macro">assert!</span>(iter.next().is_some());
<span class="macro">assert!</span>(iter.next().is_some());
<span class="macro">assert!</span>(iter.next().is_none());
<span class="kw">let </span>pairs = map.iter().collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;();
<span class="macro">assert!</span>(pairs.contains(<span class="kw-2">&amp;</span>(<span class="kw-2">&amp;</span>header::HOST, <span class="kw-2">&amp;</span>HeaderValue::from_static(<span class="string">"duck.com"</span>))));
<span class="macro">assert!</span>(pairs.contains(<span class="kw-2">&amp;</span>(<span class="kw-2">&amp;</span>header::SET_COOKIE, <span class="kw-2">&amp;</span>HeaderValue::from_static(<span class="string">"one=1"</span>))));
<span class="macro">assert!</span>(pairs.contains(<span class="kw-2">&amp;</span>(<span class="kw-2">&amp;</span>header::SET_COOKIE, <span class="kw-2">&amp;</span>HeaderValue::from_static(<span class="string">"two=2"</span>))));</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.keys" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#549-551">source</a><h4 class="code-header">pub fn <a href="#method.keys" class="fn">keys</a>(&amp;self) -&gt; <a class="struct" href="struct.Keys.html" title="struct actix_http::header::map::Keys">Keys</a>&lt;'_&gt; <a href="#" class="tooltip" data-notable-ty="Keys&lt;&#39;_&gt;"></a></h4></section></summary><div class="docblock"><p>An iterator over all contained header names.</p>
<p>Each name will only be yielded once even if it has multiple associated values. The iteration
order should be considered arbitrary.</p>
<h5 id="examples-17"><a class="doc-anchor" href="#examples-17">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
<span class="kw">let </span><span class="kw-2">mut </span>iter = map.keys();
<span class="macro">assert!</span>(iter.next().is_none());
map.append(header::HOST, HeaderValue::from_static(<span class="string">"duck.com"</span>));
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=1"</span>));
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"two=2"</span>));
<span class="kw">let </span>keys = map.keys().cloned().collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;();
<span class="macro">assert_eq!</span>(keys.len(), <span class="number">2</span>);
<span class="macro">assert!</span>(keys.contains(<span class="kw-2">&amp;</span>header::HOST));
<span class="macro">assert!</span>(keys.contains(<span class="kw-2">&amp;</span>header::SET_COOKIE));</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.retain" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#574-584">source</a><h4 class="code-header">pub fn <a href="#method.retain" class="fn">retain</a>&lt;F&gt;(&amp;mut self, retain_fn: F)<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;<a class="struct" href="../struct.HeaderName.html" title="struct actix_http::header::HeaderName">HeaderName</a>, &amp;mut <a class="struct" href="../struct.HeaderValue.html" title="struct actix_http::header::HeaderValue">HeaderValue</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Retains only the headers specified by the predicate.</p>
<p>In other words, removes all headers <code>(name, val)</code> for which <code>retain_fn(&amp;name, &amp;mut val)</code>
returns false.</p>
<p>The order in which headers are visited should be considered arbitrary.</p>
<h5 id="examples-18"><a class="doc-anchor" href="#examples-18">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
map.append(header::HOST, HeaderValue::from_static(<span class="string">"duck.com"</span>));
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=1"</span>));
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"two=2"</span>));
map.retain(|name, val| val.as_bytes().starts_with(<span class="string">b"one"</span>));
<span class="macro">assert_eq!</span>(map.len(), <span class="number">1</span>);
<span class="macro">assert!</span>(map.contains_key(<span class="kw-2">&amp;</span>header::SET_COOKIE));</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drain" class="method"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#612-614">source</a><h4 class="code-header">pub fn <a href="#method.drain" class="fn">drain</a>(&amp;mut self) -&gt; <a class="struct" href="struct.Drain.html" title="struct actix_http::header::map::Drain">Drain</a>&lt;'_&gt; <a href="#" class="tooltip" data-notable-ty="Drain&lt;&#39;_&gt;"></a></h4></section></summary><div class="docblock"><p>Clears the map, returning all name-value sets as an iterator.</p>
<p>Header names will only be yielded for the first value in each set. All items that are
yielded without a name and after an item with a name are associated with that same name.
The first item will always contain a name.</p>
<p>Keeps the allocated memory for reuse.</p>
<h5 id="examples-19"><a class="doc-anchor" href="#examples-19">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>map = HeaderMap::new();
<span class="kw">let </span><span class="kw-2">mut </span>iter = map.drain();
<span class="macro">assert!</span>(iter.next().is_none());
drop(iter);
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"one=1"</span>));
map.append(header::SET_COOKIE, HeaderValue::from_static(<span class="string">"two=2"</span>));
<span class="kw">let </span><span class="kw-2">mut </span>iter = map.drain();
<span class="macro">assert_eq!</span>(iter.next().unwrap(), (<span class="prelude-val">Some</span>(header::SET_COOKIE), HeaderValue::from_static(<span class="string">"one=1"</span>)));
<span class="macro">assert_eq!</span>(iter.next().unwrap(), (<span class="prelude-val">None</span>, HeaderValue::from_static(<span class="string">"two=2"</span>)));
drop(iter);
<span class="macro">assert!</span>(map.is_empty());</code></pre></div>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-HeaderMap" class="impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#32">source</a><a href="#impl-Clone-for-HeaderMap" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#32">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Self</a>)</h4></section></summary><div class='docblock'>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></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-HeaderMap" class="impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#32">source</a><a href="#impl-Debug-for-HeaderMap" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#32">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-HeaderMap" class="impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#32">source</a><a href="#impl-Default-for-HeaderMap" class="anchor">§</a><h3 class="code-header">impl <a clas
</div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#655-657">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(map: &amp;<a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a>) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHeaderMap%3E-for-HeaderMap" class="impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#640-644">source</a><a href="#impl-From%3CHeaderMap%3E-for-HeaderMap" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://docs.rs/http/0.2.11/http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a>&gt; for <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a></h3></section></summary><div class="docblock"><p>Convert a <code>http::HeaderMap</code> to our <code>HeaderMap</code>.</p>
</div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#641-643">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(map: <a class="struct" href="https://docs.rs/http/0.2.11/http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a>) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHeaderMap%3E-for-HeaderMap-1" class="impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#647-651">source</a><a href="#impl-From%3CHeaderMap%3E-for-HeaderMap-1" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a>&gt; for <a class="struct" href="https://docs.rs/http/0.2.11/http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a></h3></section></summary><div class="docblock"><p>Convert our <code>HeaderMap</code> to a <code>http::HeaderMap</code>.</p>
</div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#648-650">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(map: <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a>) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26HeaderMap" class="impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#629-637">source</a><a href="#impl-IntoIterator-for-%26HeaderMap" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &amp;'a <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = (&amp;'a <a class="struct" href="../struct.HeaderName.html" title="struct actix_http::header::HeaderName">HeaderName</a>, &amp;'a <a class="struct" href="../struct.HeaderValue.html" title="struct actix_http::header::HeaderValue">HeaderValue</a>)</h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter-1" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="struct.Iter.html" title="struct actix_http::header::map::Iter">Iter</a>&lt;'a&gt;</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-1" class="method trait-impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#634-636">source</a><a href="#method.into_iter-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -&gt; Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-HeaderMap" class="impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#619-627">source</a><a href="#impl-IntoIterator-for-HeaderMap" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a></h3></section></s
<a href="struct.HeaderMap.html#method.drain" title="method actix_http::header::map::HeaderMap::drain"><code>drain</code></a> to control header name cloning.</p>
</div><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="../struct.HeaderName.html" title="struct actix_http::header::HeaderName">HeaderName</a>, <a class="struct" href="../struct.HeaderValue.html" title="struct actix_http::header::HeaderValue">HeaderValue</a>)</h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="struct.IntoIter.html" title="struct actix_http::header::map::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a class="src rightside" href="../../../src/actix_http/header/map.rs.html#624-626">source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -&gt; Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-HeaderMap" class="impl"><a href="#impl-Freeze-for-HeaderMap" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a></h3></section><section id="impl-RefUnwindSafe-for-HeaderMap" class="impl"><a href="#impl-RefUnwindSafe-for-HeaderMap" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a></h3></section><section id="impl-Send-for-HeaderMap" class="impl"><a href="#impl-Send-for-HeaderMap" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a></h3></section><section id="impl-Sync-for-HeaderMap" class="impl"><a href="#impl-Sync-for-HeaderMap" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.HeaderMap.html" title="struct actix_http::header::map::HeaderMap">HeaderMap</a></h3></section><section id="impl-Unpin-for-HeaderMap" class="impl"><a href="#impl-Unpin-for-HeaderMap" class=
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#765">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#768">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Instrument-for-T" class="impl"><a href="#impl-Instrument-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Instrument for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl"><a href="#method.instrument" class="anchor">§</a><h4 class="code-header">fn <a class="fn">instrument</a>(self, span: Span) -&gt; Instrumented&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the provided [<code>Span</code>], returning an
<code>Instrumented</code> wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl"><a href="#method.in_current_span" class="anchor">§</a><h4 class="code-header">fn <a class="fn">in_current_span</a>(self) -&gt; Instrumented&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the <a href="super::Span::current()">current</a> <a href="crate::Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#748-750">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#758">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Same-for-T" class="impl"><a class="src rightside" href="https://docs.rs/typenum/1.17.0/src/typenum/type_operators.rs.html#34">source</a><a href="#impl-Same-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/typenum/1.17.0/typenum/type_operators/trait.Same.html" title="trait typenum::type_operators::Same">Same</a> for T</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://docs.rs/typenum/1.17.0/typenum/type_operators/trait.Same.html#associatedtype.Output" class="associatedtype">Output</a> = T</h4></section></summary><div class='docblock'>Should always be <code>Self</code></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&amp;self) -&gt; T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#805-807">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#812">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#790-792">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#797">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-T" class="impl"><a href="#impl-VZip%3CV%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;V, T&gt; VZip&lt;V&gt; for T<div class="where">where
V: MultiLane&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl"><a href="#method.vzip" class="anchor">§</a><h4 class="code-header">fn <a class="fn">vzip</a>(self) -&gt; V</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-T" class="impl"><a href="#impl-WithSubscriber-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; WithSubscriber for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl"><a href="#method.with_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_subscriber</a>&lt;S&gt;(self, subscriber: S) -&gt; WithDispatch&lt;Self&gt;<div class="where">where
S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;Dispatch&gt;,</div></h4></section></summary><div class='docblock'>Attaches the provided <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl"><a href="#method.with_current_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_current_subscriber</a>(self) -&gt; WithDispatch&lt;Self&gt;</h4></section></summary><div class='docblock'>Attaches the current <a href="crate::dispatcher#setting-the-default-subscriber">default</a> <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details></div></details></div><script type="text/json" id="notable-traits-data">{"Drain<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Drain.html\" title=\"struct actix_http::header::map::Drain\">Drain</a>&lt;'a&gt;</code></h3><pre><code><div class=\"where\">impl&lt;'a&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Drain.html\" title=\"struct actix_http::header::map::Drain\">Drain</a>&lt;'a&gt;</div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = (<a class=\"enum\" href=\"https://doc.rust-lang.org/nightly/core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;<a class=\"struct\" href=\"../struct.HeaderName.html\" title=\"struct actix_http::header::HeaderName\">HeaderName</a>&gt;, <a class=\"struct\" href=\"../struct.HeaderValue.html\" title=\"struct actix_http::header::HeaderValue\">HeaderValue</a>);</div>","Iter<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Iter.html\" title=\"struct actix_http::header::map::Iter\">Iter</a>&lt;'a&gt;</code></h3><pre><code><div class=\"where\">impl&lt;'a&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Iter.html\" title=\"struct actix_http::header::map::Iter\">Iter</a>&lt;'a&gt;</div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = (&amp;'a <a class=\"struct\" href=\"../struct.HeaderName.html\" title=\"struct actix_http::header::HeaderName\">HeaderName</a>, &amp;'a <a class=\"struct\" href=\"../struct.HeaderValue.html\" title=\"struct actix_http::header::HeaderValue\">HeaderValue</a>);</div>","Keys<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Keys.html\" title=\"struct actix_http::header::map::Keys\">Keys</a>&lt;'a&gt;</code></h3><pre><code><div class=\"where\">impl&lt;'a&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Keys.html\" title=\"struct actix_http::header::map::Keys\">Keys</a>&lt;'a&gt;</div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = &amp;'a <a class=\"struct\" href=\"../struct.HeaderName.html\" title=\"struct actix_http::header::HeaderName\">HeaderName</a>;</div>","Removed":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Removed.html\" title=\"struct actix_http::header::map::Removed\">Removed</a></code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Removed.html\" title=\"struct actix_http::header::map::Removed\">Removed</a></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"../struct.HeaderValue.html\" title=\"struct actix_http::header::HeaderValue\">HeaderValue</a>;</div>"}</script></section></div></main></body></html>