<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../../hashbrown/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Struct <ahref="../index.html">hashbrown</a>::<wbr><ahref="index.html">hash_table</a>::<wbr><aclass="struct"href="#">HashTable</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../../src/hashbrown/table.rs.html#45-50">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub struct HashTable<T, A = Global><divclass="where">where
<p>The primary use case for this type over <ahref="../hash_map/struct.HashMap.html"title="struct hashbrown::hash_map::HashMap"><code>HashMap</code></a> or <ahref="../hash_set/struct.HashSet.html"title="struct hashbrown::hash_set::HashSet"><code>HashSet</code></a> is to
support types that do not implement the <ahref="https://doc.rust-lang.org/1.78.0/core/hash/macros/derive.Hash.html"title="derive core::hash::macros::Hash"><code>Hash</code></a> and <ahref="https://doc.rust-lang.org/1.78.0/core/cmp/trait.Eq.html"title="trait core::cmp::Eq"><code>Eq</code></a> traits, but
instead require additional data not contained in the key itself to compute a
hash and compare two elements for equality.</p>
<p>Examples of when this can be useful include:</p>
<ul>
<li>An <code>IndexMap</code> implementation where indices into a <code>Vec</code> are stored as
elements in a <code>HashTable<usize></code>. Hashing and comparing the elements
requires indexing the associated <code>Vec</code> to get the actual value referred to
by the index.</li>
<li>Avoiding re-computing a hash when it is already known.</li>
<li>Mutating the key of an element in a way that doesn’t affect its hash.</li>
</ul>
<p>To achieve this, <code>HashTable</code> methods that search for an element in the table
require a hash value and equality function to be explicitly passed in as
arguments. The method will then iterate over the elements with the given
hash and call the equality function on each of them, until a match is found.</p>
<p>In most cases, a <code>HashTable</code> will not be exposed directly in an API. It will
instead be wrapped in a helper type which handles the work of calculating
hash values and comparing elements.</p>
<p>Due to its low-level nature, this type provides fewer guarantees than
<ahref="../hash_map/struct.HashMap.html"title="struct hashbrown::hash_map::HashMap"><code>HashMap</code></a> and <ahref="../hash_set/struct.HashSet.html"title="struct hashbrown::hash_set::HashSet"><code>HashSet</code></a>. Specifically, the API allows you to shoot
yourself in the foot by having multiple elements with identical keys in the
table. The table itself will still function correctly and lookups will
arbitrarily return one of the matching elements. However you should avoid
doing this because it changes the runtime of hash table operations from
<code>O(1)</code> to <code>O(k)</code> where <code>k</code> is the number of duplicate entries.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.with_capacity"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#85-89">source</a><h4class="code-header">pub fn <ahref="#method.with_capacity"class="fn">with_capacity</a>(capacity: <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.usize.html">usize</a>) -> Self</h4></section></summary><divclass="docblock"><p>Creates an empty <code>HashTable</code> with the specified capacity.</p>
A: Allocator,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.new_in"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#134-138">source</a><h4class="code-header">pub const fn <ahref="#method.new_in"class="fn">new_in</a>(alloc: A) -> Self</h4></section></summary><divclass="docblock"><p>Creates an empty <code>HashTable</code> using the given allocator.</p>
<p>The hash table is initially created with a capacity of 0, so it will not allocate until it
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.with_capacity_in"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#183-187">source</a><h4class="code-header">pub fn <ahref="#method.with_capacity_in"class="fn">with_capacity_in</a>(capacity: <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.usize.html">usize</a>, alloc: A) -> Self</h4></section></summary><divclass="docblock"><p>Creates an empty <code>HashTable</code> with the specified capacity using the given allocator.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.allocator"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#190-192">source</a><h4class="code-header">pub fn <ahref="#method.allocator"class="fn">allocator</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&A</a></h4></section></summary><divclass="docblock"><p>Returns a reference to the underlying allocator.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#224-226">source</a><h4class="code-header">pub fn <ahref="#method.find"class="fn">find</a>(&self, hash: <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.u64.html">u64</a>, eq: impl <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.bool.html">bool</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&T</a>></h4></section></summary><divclass="docblock"><p>Returns a reference to an entry in the table with the given hash and
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&mut T</a>></h4></section></summary><divclass="docblock"><p>Returns a mutable reference to an entry in the table with the given hash
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.OccupiedEntry.html"title="struct hashbrown::hash_table::OccupiedEntry">OccupiedEntry</a><'_, T, A>, <aclass="struct"href="struct.AbsentEntry.html"title="struct hashbrown::hash_table::AbsentEntry">AbsentEntry</a><'_, T, A>></h4></section></summary><divclass="docblock"><p>Returns an <code>OccupiedEntry</code> for an entry in the table with the given hash
and which satisfies the equality function passed.</p>
<p>This can be used to remove the entry from the table. Call
<ahref="struct.HashTable.html#method.entry"title="method hashbrown::hash_table::HashTable::entry"><code>HashTable::entry</code></a> instead if you wish to insert an entry if the
lookup fails.</p>
<p>This method will call <code>eq</code> for all entries with the given hash, but may
also call it for entries with a different hash. <code>eq</code> should only return
true for the desired entry, at which point the search is stopped.</p>
) -><aclass="enum"href="enum.Entry.html"title="enum hashbrown::hash_table::Entry">Entry</a><'_, T, A></h4></section></summary><divclass="docblock"><p>Returns an <code>Entry</code> for an entry in the table with the given hash
and which satisfies the equality function passed.</p>
<p>This can be used to remove the entry from the table, or insert a new
entry with the given hash if one doesn’t already exist.</p>
<p>This method will call <code>eq</code> for all entries with the given hash, but may
also call it for entries with a different hash. <code>eq</code> should only return
true for the desired entry, at which point the search is stopped.</p>
<p>This method may grow the table in preparation for an insertion. Call
<ahref="struct.HashTable.html#method.find_entry"title="method hashbrown::hash_table::HashTable::find_entry"><code>HashTable::find_entry</code></a> if this is undesirable.</p>
<p><code>hasher</code> is called if entries need to be moved or copied to a new table.
This must return the same hash value that each entry was inserted with.</p>
) -><aclass="struct"href="struct.OccupiedEntry.html"title="struct hashbrown::hash_table::OccupiedEntry">OccupiedEntry</a><'_, T, A></h4></section></summary><divclass="docblock"><p>Inserts an element into the <code>HashTable</code> with the given hash value, but
without checking whether an equivalent element already exists within the
table.</p>
<p><code>hasher</code> is called if entries need to be moved or copied to a new table.
This must return the same hash value that each entry was inserted with.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.shrink_to_fit"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#480-482">source</a><h4class="code-header">pub fn <ahref="#method.shrink_to_fit"class="fn">shrink_to_fit</a>(&mut self, hasher: impl <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/ops/function/trait.Fn.html"title="trait core::ops::function::Fn">Fn</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.u64.html">u64</a>)</h4></section></summary><divclass="docblock"><p>Shrinks the capacity of the table as much as possible. It will drop
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.shrink_to"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#519-521">source</a><h4class="code-header">pub fn <ahref="#method.shrink_to"class="fn">shrink_to</a>(&mut self, min_capacity: <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.usize.html">usize</a>, hasher: impl <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/ops/function/trait.Fn.html"title="trait core::ops::function::Fn">Fn</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.u64.html">u64</a>)</h4></section></summary><divclass="docblock"><p>Shrinks the capacity of the table with a lower limit. It will drop
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reserve"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#559-561">source</a><h4class="code-header">pub fn <ahref="#method.reserve"class="fn">reserve</a>(&mut self, additional: <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.usize.html">usize</a>, hasher: impl <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/ops/function/trait.Fn.html"title="trait core::ops::function::Fn">Fn</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.u64.html">u64</a>)</h4></section></summary><divclass="docblock"><p>Reserves capacity for at least <code>additional</code> more elements to be inserted
<p>Panics if the new capacity exceeds <ahref="https://doc.rust-lang.org/std/primitive.isize.html"><code>isize::MAX</code></a> bytes and <ahref="https://doc.rust-lang.org/alloc/alloc/fn.handle_alloc_error.html"><code>abort</code></a> the program
in case of allocation error. Use <ahref="struct.HashTable.html#method.try_reserve"title="method hashbrown::hash_table::HashTable::try_reserve"><code>try_reserve</code></a> instead
if you want to handle memory allocation failure.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.unit.html">()</a>, <aclass="enum"href="../enum.TryReserveError.html"title="enum hashbrown::TryReserveError">TryReserveError</a>></h4></section></summary><divclass="docblock"><p>Tries to reserve capacity for at least <code>additional</code> more elements to be inserted
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.capacity"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#613-615">source</a><h4class="code-header">pub fn <ahref="#method.capacity"class="fn">capacity</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Returns the number of elements the table can hold without reallocating.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.len"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#640-642">source</a><h4class="code-header">pub fn <ahref="#method.len"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Returns the number of elements in the table.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_empty"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#667-669">source</a><h4class="code-header">pub fn <ahref="#method.is_empty"class="fn">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the set contains no elements.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.retain"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#785-794">source</a><h4class="code-header">pub fn <ahref="#method.retain"class="fn">retain</a>(&mut self, f: impl <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&mut T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.bool.html">bool</a>)</h4></section></summary><divclass="docblock"><p>Retains only the elements specified by the predicate.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.drain"class="method"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#827-831">source</a><h4class="code-header">pub fn <ahref="#method.drain"class="fn">drain</a>(&mut self) -><aclass="struct"href="struct.Drain.html"title="struct hashbrown::hash_table::Drain">Drain</a><'_, T, A><ahref="#"class="tooltip"data-notable-ty="Drain<'_, T, A>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Clears the set, returning all elements in an iterator.</p>
F: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&mut T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Drains elements which are true under the given predicate,
and returns an iterator over the removed items.</p>
<p>In other words, move all elements <code>e</code> such that <code>f(&e)</code> returns <code>true</code> out
into another iterator.</p>
<p>If the returned <code>ExtractIf</code> is not exhausted, e.g. because it is dropped without iterating
or the iteration short-circuits, then the remaining elements will be retained.
Use <ahref="struct.HashTable.html#method.retain"title="method hashbrown::hash_table::HashTable::retain"><code>retain()</code></a> with a negated predicate if you do not need the returned iterator.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><[<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&mut T</a>; <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.array.html">N</a>]></h4></section></summary><divclass="docblock"><p>Attempts to get mutable references to <code>N</code> values in the map at once.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><[<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&mut T</a>; <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.array.html">N</a>]></h4></section></summary><divclass="docblock"><p>Attempts to get mutable references to <code>N</code> values in the map at once, without validating that
<p>The <code>eq</code> argument should be a closure such that <code>eq(i, k)</code> returns true if <code>k</code> is equal to
the <code>i</code>th key to be looked up.</p>
<p>Returns an array of length <code>N</code> with the results of each query. <code>None</code> will be returned if
any of the keys are missing.</p>
<p>For a safe alternative see <ahref="struct.HashTable.html#method.get_many_mut"title="method hashbrown::hash_table::HashTable::get_many_mut"><code>get_many_mut</code></a>.</p>
<p>Calling this method with overlapping keys is <em><ahref="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em> even if the resulting
A: Allocator,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt"class="method trait-impl"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#1086-1088">source</a><ahref="#method.fmt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.78.0/core/fmt/trait.Debug.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.78.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.78.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/1.78.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Default-for-HashTable%3CT,+A%3E"class="impl"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#1058-1067">source</a><ahref="#impl-Default-for-HashTable%3CT,+A%3E"class="anchor">§</a><h3class="code-header">impl<T, A><aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/default/trait.Default.html"title="trait core::default::Default">Default</a> for <aclass="struct"href="struct.HashTable.html"title="struct hashbrown::hash_table::HashTable">HashTable</a><T, A><divclass="where">where
A: Allocator + <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/default/trait.Default.html"title="trait core::default::Default">Default</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.default"class="method trait-impl"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#1062-1066">source</a><ahref="#method.default"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.78.0/core/default/trait.Default.html#tymethod.default"class="fn">default</a>() -> Self</h4></section></summary><divclass='docblock'>Returns the “default value” for a type. <ahref="https://doc.rust-lang.org/1.78.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-IntoIterator-for-%26HashTable%3CT,+A%3E"class="impl"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#1034-1044">source</a><ahref="#impl-IntoIterator-for-%26HashTable%3CT,+A%3E"class="anchor">§</a><h3class="code-header">impl<'a, T, A><aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'a <aclass="struct"href="struct.HashTable.html"title="struct hashbrown::hash_table::HashTable">HashTable</a><T, A><divclass="where">where
A: Allocator,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Item-2"class="associatedtype trait-impl"><ahref="#associatedtype.Item-2"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item"class="associatedtype">Item</a> = <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&'a T</a></h4></section></summary><divclass='docblock'>The type of the elements being iterated over.</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.IntoIter-2"class="associatedtype trait-impl"><ahref="#associatedtype.IntoIter-2"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"class="associatedtype">IntoIter</a> = <aclass="struct"href="struct.Iter.html"title="struct hashbrown::hash_table::Iter">Iter</a><'a, T></h4></section></summary><divclass='docblock'>Which kind of iterator are we turning this into?</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_iter-2"class="method trait-impl"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#1041-1043">source</a><ahref="#method.into_iter-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter"class="fn">into_iter</a>(self) -><aclass="struct"href="struct.Iter.html"title="struct hashbrown::hash_table::Iter">Iter</a><'a, T><ahref="#"class="tooltip"data-notable-ty="Iter<'a, T>">ⓘ</a></h4></section></summary><divclass='docblock'>Creates an iterator from a value. <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-IntoIterator-for-%26mut+HashTable%3CT,+A%3E"class="impl"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#1046-1056">source</a><ahref="#impl-IntoIterator-for-%26mut+HashTable%3CT,+A%3E"class="anchor">§</a><h3class="code-header">impl<'a, T, A><aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'a mut <aclass="struct"href="struct.HashTable.html"title="struct hashbrown::hash_table::HashTable">HashTable</a><T, A><divclass="where">where
A: Allocator,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Item"class="associatedtype trait-impl"><ahref="#associatedtype.Item"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item"class="associatedtype">Item</a> = <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&'a mut T</a></h4></section></summary><divclass='docblock'>The type of the elements being iterated over.</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.IntoIter"class="associatedtype trait-impl"><ahref="#associatedtype.IntoIter"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"class="associatedtype">IntoIter</a> = <aclass="struct"href="struct.IterMut.html"title="struct hashbrown::hash_table::IterMut">IterMut</a><'a, T></h4></section></summary><divclass='docblock'>Which kind of iterator are we turning this into?</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_iter"class="method trait-impl"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#1053-1055">source</a><ahref="#method.into_iter"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter"class="fn">into_iter</a>(self) -><aclass="struct"href="struct.IterMut.html"title="struct hashbrown::hash_table::IterMut">IterMut</a><'a, T><ahref="#"class="tooltip"data-notable-ty="IterMut<'a, T>">ⓘ</a></h4></section></summary><divclass='docblock'>Creates an iterator from a value. <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-IntoIterator-for-HashTable%3CT,+A%3E"class="impl"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#1020-1032">source</a><ahref="#impl-IntoIterator-for-HashTable%3CT,+A%3E"class="anchor">§</a><h3class="code-header">impl<T, A><aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <aclass="struct"href="struct.HashTable.html"title="struct hashbrown::hash_table::HashTable">HashTable</a><T, A><divclass="where">where
A: Allocator,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Item-1"class="associatedtype trait-impl"><ahref="#associatedtype.Item-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item"class="associatedtype">Item</a> = T</h4></section></summary><divclass='docblock'>The type of the elements being iterated over.</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.IntoIter-1"class="associatedtype trait-impl"><ahref="#associatedtype.IntoIter-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"class="associatedtype">IntoIter</a> = <aclass="struct"href="struct.IntoIter.html"title="struct hashbrown::hash_table::IntoIter">IntoIter</a><T, A></h4></section></summary><divclass='docblock'>Which kind of iterator are we turning this into?</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_iter-1"class="method trait-impl"><aclass="src rightside"href="../../src/hashbrown/table.rs.html#1027-1031">source</a><ahref="#method.into_iter-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter"class="fn">into_iter</a>(self) -><aclass="struct"href="struct.IntoIter.html"title="struct hashbrown::hash_table::IntoIter">IntoIter</a><T, A><ahref="#"class="tooltip"data-notable-ty="IntoIter<T, A>">ⓘ</a></h4></section></summary><divclass='docblock'>Creates an iterator from a value. <ahref="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details></div><h2id="synthetic-implementations"class="section-header">Auto Trait Implementations<ahref="#synthetic-implementations"class="anchor">§</a></h2><divid="synthetic-implementations-list"><sectionid="impl-Freeze-for-HashTable%3CT,+A%3E"class="impl"><ahref="#impl-Freeze-for-HashTable%3CT,+A%3E"class="anchor">§</a><h3class="code-header">impl<T, A><aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/marker/trait.Freeze.html"title="trait core::marker::Freeze">Freeze</a> for <aclass="struct"href="struct.HashTable.html"title="struct hashbrown::hash_table::HashTable">HashTable</a><T, A><divclass="where">where
A: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/marker/trait.Freeze.html"title="trait core::marker::Freeze">Freeze</a>,</div></h3></section><sectionid="impl-RefUnwindSafe-for-HashTable%3CT,+A%3E"class="impl"><ahref="#impl-RefUnwindSafe-for-HashTable%3CT,+A%3E"class="anchor">§</a><h3class="code-header">impl<T, A><aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/panic/unwind_safe/trait.RefUnwindSafe.html"title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <aclass="struct"href="struct.HashTable.html"title="struct hashbrown::hash_table::HashTable">HashTable</a><T, A><divclass="where">where
<code><ahref="https://doc.rust-lang.org/1.78.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-ToOwned-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.78.0/src/alloc/borrow.rs.html#83-85">source</a><ahref="#impl-ToOwned-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.78.0/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> for T<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Owned"class="associatedtype trait-impl"><ahref="#associatedtype.Owned"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.78.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned"class="associatedtype">Owned</a> = T</h4></section></summary><divclass='docblock'>The resulting type after obtaining ownership.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_owned"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.78.0/src/alloc/borrow.rs.html#88">source</a><ahref="#method.to_owned"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.78.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned"class="fn">to_owned</a>(&self) -> T</h4></section></summary><divclass='docblock'>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/1.78.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.78.0/src/alloc/borrow.rs.html#92">source</a><ahref="#method.clone_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.78.0/alloc/borrow/trait.ToOwned.html#method.clone_into"class="fn">clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/core/primitive.reference.html">&mut T</a>)</h4></section></summary><divclass='docblock'>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/1.78.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.78.0/src/core/convert/mod.rs.html#805-807">source</a><ahref="#impl-TryFrom%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.78.0/src/core/convert/mod.rs.html#812">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.78.0/src/core/convert/mod.rs.html#790-792">source</a><ahref="#impl-TryInto%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.78.0/src/core/convert/mod.rs.html#797">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div><scripttype="text/json"id="notable-traits-data">{"Drain<'_,T,A>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.Drain.html\"title=\"structhashbrown::hash_table::Drain\">Drain</a><'_,T,A></code></h3><pre><code><divclass=\"where\">impl<T,A:Allocator><aclass=\"trait\"href=\"https://doc.rust-lang.org/1.78.0/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a>for<aclass=\"struct\"href=\"struct.Drain.html\"title=\"structhashbrown::hash_table::Drain\">Drain</a><'_,T,A></div><divclass=\"where\">type<ahref=\"https://doc.rust-lang.org/1.78.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\"class=\"associatedtype\">Item</a>=T;</div>","ExtractIf<'_,T,F,A>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.ExtractIf.html\"title=\"structhashbrown::hash_table::ExtractIf\">ExtractIf</a><'_,T,F,A></code></h3><pre><code><divclass=\"where\">impl<T,F,A:Allocator><aclass=\"trait\"href=\"https://doc.rust-lang.org/1.78.0/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a>for<aclass=\"struct\"href=\"struct.ExtractIf.html\"title=\"structhashbrown::hash_table::ExtractIf\">ExtractIf</a><'_,T,F,A><divclass=\"where\">where\nF:<aclass=\"trait\"href=\"https://doc.rust-lang.org/1.78.0/core/ops/function/trait.FnMut.html\"title=\"traitcore::ops::function::FnMut\">FnMut</a>(<aclass=\"primitive\"href=\"https://doc.rust-lang.org/1.78.0/core/primitive.reference.html\">&mutT</a>)-><aclass=\"primitive\"href=\"https://doc.rust-lang.org/1.78.0/core/primitive.bool.html\">bool</a>,</div></div><divclass=\"where\">type<ahref=\"https://doc.rust-lang.org/1.78.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\"class=\"associatedtype\">Item</a>=T;</div>","IntoIter<T,A>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.IntoIter.html\"title=\"structhashbrown::hash_table::IntoIter\">IntoIter</a><T,