<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="A raw hash table with an unsafe API."><title>RawTable in hashbrown::raw - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../static.files/rustdoc-5bc39a1768837dd0.css"><metaname="rustdoc-vars"data-root-path="../../"data-static-root-path="../../static.files/"data-current-crate="hashbrown"data-themes=""data-resource-suffix=""data-rustdoc-version="1.77.2 (25ef9e3d8 2024-04-09)"data-channel="1.77.2"data-search-js="search-dd67cee4cfa65049.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../../static.files/storage-4c98445ec4002617.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../static.files/main-48f368f3872407c8.js"></script><noscript><linkrel="stylesheet"href="../../static.files/noscript-04d5337699b92874.css"></noscript><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle"title="show sidebar"></button></nav><navclass="sidebar"><divclass="sidebar-crate"><h2><ahref="../../hashbrown/index.html">hashbrown</a><spanclass="version">0.14.3</span></h2></div><h2class="location"><ahref="#">RawTable</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.allocation_info">allocation_info</a></li><li><ahref="#method.allocator">allocator</a></li><li><ahref="#method.bucket">bucket</a></li><li><ahref="#method.bucket_index">bucket_index</a></li><li><ahref="#method.buckets">buckets</a></li><li><ahref="#method.capacity">capacity</a></li><li><ahref="#method.clear">clear</a></li><li><ahref="#method.clear_no_drop">clear_no_drop</a></li><li><ahref="#method.clone_from_with_hasher">clone_from_with_hasher</a></li><li><ahref="#method.data_end">data_end</a></li><li><ahref="#method.data_start">data_start</a></li><li><ahref="#method.drain">drain</a></li><li><ahref="#method.drain_iter_from">drain_iter_from</a></li><li><ahref="#method.erase">erase</a></li><li><ahref="#method.erase_entry">erase_entry</a></li><li><ahref="#method.find">find</a></li><li><ahref="#method.find_or_find_insert_slot">find_or_find_insert_slot</a></li><li><ahref="#method.get">get</a></li><li><ahref="#method.get_many_mut">get_many_mut</a></li><li><ahref="#method.get_many_unchecked_mut">get_many_unchecked_mut</a></li><li><ahref="#method.get_mut">get_mut</a></li><li><ahref="#method.insert">insert</a></li><li><ahref="#method.insert_entry">insert_entry</a></li><li><ahref="#method.insert_in_slot">insert_in_slot</a></li><li><ahref="#method.insert_no_grow">insert_no_grow</a></li><li><ahref="#method.into_iter_from">into_iter_from</a></li><li><ahref="#method.is_bucket_full">is_bucket_full</a></li><li><ahref="#method.is_empty">is_em
<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">raw</a>::<wbr><aclass="struct"href="#">RawTable</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/raw/mod.rs.html#786-791">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub struct RawTable<T, A: Allocator = Global> { <spanclass="comment">/* private fields */</span> }</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>A raw hash table with an unsafe API.</p>
</div></details><h2id="implementations"class="section-header">Implementations<ahref="#implementations"class="anchor">§</a></h2><divid="implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-RawTable%3CT%3E"class="impl"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#811-838">source</a><ahref="#impl-RawTable%3CT%3E"class="anchor">§</a><h3class="code-header">impl<T><aclass="struct"href="struct.RawTable.html"title="struct hashbrown::raw::RawTable">RawTable</a><T, Global></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.new"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#818-824">source</a><h4class="code-header">pub const fn <ahref="#method.new"class="fn">new</a>() -> Self</h4></section></summary><divclass="docblock"><p>Creates a new empty hash table without allocating any memory.</p>
<p>In effect this returns a table with exactly 1 bucket. However we can
leave the data pointer dangling since that bucket is never written to
due to our load factor forcing us to always have at least 1 free bucket.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_with_capacity"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#829-831">source</a><h4class="code-header">pub fn <ahref="#method.try_with_capacity"class="fn">try_with_capacity</a>(capacity: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.usize.html">usize</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/result/enum.Result.html"title="enum core::result::Result">Result</a><Self, <aclass="enum"href="../enum.TryReserveError.html"title="enum hashbrown::TryReserveError">TryReserveError</a>></h4></section></summary><divclass="docblock"><p>Attempts to allocate a new hash table with at least enough capacity
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.with_capacity"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#835-837">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.77.2/core/primitive.usize.html">usize</a>) -> Self</h4></section></summary><divclass="docblock"><p>Allocates a new hash table with at least enough capacity for inserting
the given number of elements without reallocating.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-RawTable%3CT,+A%3E"class="impl"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#840-1686">source</a><ahref="#impl-RawTable%3CT,+A%3E"class="anchor">§</a><h3class="code-header">impl<T, A: Allocator><aclass="struct"href="struct.RawTable.html"title="struct hashbrown::raw::RawTable">RawTable</a><T, A></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.new_in"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#850-856">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 a new empty hash table without allocating any memory, using the
given allocator.</p>
<p>In effect this returns a table with exactly 1 bucket. However we can
leave the data pointer dangling since that bucket is never written to
due to our load factor forcing us to always have at least 1 free bucket.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/result/enum.Result.html"title="enum core::result::Result">Result</a><Self, <aclass="enum"href="../enum.TryReserveError.html"title="enum hashbrown::TryReserveError">TryReserveError</a>></h4></section></summary><divclass="docblock"><p>Attempts to allocate a new hash table using the given allocator, with at least enough
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.with_capacity_in"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#899-905">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.77.2/core/primitive.usize.html">usize</a>, alloc: A) -> Self</h4></section></summary><divclass="docblock"><p>Allocates a new hash table using the given allocator, with at least enough capacity for
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.allocator"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#909-911">source</a><h4class="code-header">pub fn <ahref="#method.allocator"class="fn">allocator</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/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.data_end"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#921-942">source</a><h4class="code-header">pub fn <ahref="#method.data_end"class="fn">data_end</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.2/core/ptr/non_null/struct.NonNull.html"title="struct core::ptr::non_null::NonNull">NonNull</a><T></h4></section></summary><divclass="docblock"><p>Returns pointer to one past last <code>data</code> element in the the table as viewed from
<p>The caller must ensure that the <code>RawTable</code> outlives the returned <ahref="https://doc.rust-lang.org/1.77.2/core/ptr/non_null/struct.NonNull.html"title="struct core::ptr::non_null::NonNull"><code>NonNull<T></code></a>,
otherwise using it may result in <ahref="https://doc.rust-lang.org/reference/behavior-considered-undefined.html"><code>undefined behavior</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.data_start"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#947-949">source</a><h4class="code-header">pub unsafe fn <ahref="#method.data_start"class="fn">data_start</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.2/core/ptr/non_null/struct.NonNull.html"title="struct core::ptr::non_null::NonNull">NonNull</a><T></h4></section></summary><divclass="docblock"><p>Returns pointer to start of data table.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.allocation_info"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#960-964">source</a><h4class="code-header">pub fn <ahref="#method.allocation_info"class="fn">allocation_info</a>(&self) -> (<aclass="struct"href="https://doc.rust-lang.org/1.77.2/core/ptr/non_null/struct.NonNull.html"title="struct core::ptr::non_null::NonNull">NonNull</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.u8.html">u8</a>>, <aclass="struct"href="https://doc.rust-lang.org/1.77.2/core/alloc/layout/struct.Layout.html"title="struct core::alloc::layout::Layout">Layout</a>)</h4></section></summary><divclass="docblock"><p>Return the information about memory allocated by the table.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.bucket_index"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#968-970">source</a><h4class="code-header">pub unsafe fn <ahref="#method.bucket_index"class="fn">bucket_index</a>(&self, bucket: &<aclass="struct"href="struct.Bucket.html"title="struct hashbrown::raw::Bucket">Bucket</a><T>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Returns the index of a bucket from a <code>Bucket</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.bucket"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#997-1025">source</a><h4class="code-header">pub unsafe fn <ahref="#method.bucket"class="fn">bucket</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.usize.html">usize</a>) -><aclass="struct"href="struct.Bucket.html"title="struct hashbrown::raw::Bucket">Bucket</a><T></h4></section></summary><divclass="docblock"><p>Returns a pointer to an element in the table.</p>
<p>The caller must ensure that the <code>RawTable</code> outlives the returned <ahref="struct.Bucket.html"title="struct hashbrown::raw::Bucket"><code>Bucket<T></code></a>,
otherwise using it may result in <ahref="https://doc.rust-lang.org/reference/behavior-considered-undefined.html"><code>undefined behavior</code></a>.</p>
<p>If <code>mem::size_of::<T>() != 0</code>, then the caller of this function must observe the
following safety rules:</p>
<ul>
<li>
<p>The table must already be allocated;</p>
</li>
<li>
<p>The <code>index</code> must not be greater than the number returned by the <ahref="struct.RawTable.html#method.buckets"title="method hashbrown::raw::RawTable::buckets"><code>RawTable::buckets</code></a>
function, i.e. <code>(index + 1) <= self.buckets()</code>.</p>
</li>
</ul>
<p>It is safe to call this function with index of zero (<code>index == 0</code>) on a table that has
not been allocated, but using the returned <ahref="struct.Bucket.html"title="struct hashbrown::raw::Bucket"><code>Bucket</code></a> results in <ahref="https://doc.rust-lang.org/reference/behavior-considered-undefined.html"><code>undefined behavior</code></a>.</p>
<p>If <code>mem::size_of::<T>() == 0</code>, then the only requirement is that the <code>index</code> must
not be greater than the number returned by the <ahref="struct.RawTable.html#method.buckets"title="method hashbrown::raw::RawTable::buckets"><code>RawTable::buckets</code></a> function, i.e.
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.erase"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1037-1041">source</a><h4class="code-header">pub unsafe fn <ahref="#method.erase"class="fn">erase</a>(&mut self, item: <aclass="struct"href="struct.Bucket.html"title="struct hashbrown::raw::Bucket">Bucket</a><T>)</h4></section></summary><divclass="docblock"><p>Erases an element from the table, dropping it in place.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.erase_entry"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1047-1057">source</a><h4class="code-header">pub fn <ahref="#method.erase_entry"class="fn">erase_entry</a>(&mut self, hash: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.u64.html">u64</a>, eq: impl <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.bool.html">bool</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Finds and erases an element from the table, dropping it in place.
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/option/enum.Option.html"title="enum core::option::Option">Option</a><T></h4></section></summary><divclass="docblock"><p>Finds and removes an element from the table, returning it.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clear_no_drop"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1086-1088">source</a><h4class="code-header">pub fn <ahref="#method.clear_no_drop"class="fn">clear_no_drop</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Marks all table buckets as empty without dropping their contents.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clear"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1092-1105">source</a><h4class="code-header">pub fn <ahref="#method.clear"class="fn">clear</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Removes all elements from the table without freeing the backing memory.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.shrink_to"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1109-1170">source</a><h4class="code-header">pub fn <ahref="#method.shrink_to"class="fn">shrink_to</a>(&mut self, min_size: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.usize.html">usize</a>, hasher: impl <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/ops/function/trait.Fn.html"title="trait core::ops::function::Fn">Fn</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.u64.html">u64</a>)</h4></section></summary><divclass="docblock"><p>Shrinks the table to fit <code>max(self.len(), min_size)</code> elements.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reserve"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1175-1190">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.77.2/core/primitive.usize.html">usize</a>, hasher: impl <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/ops/function/trait.Fn.html"title="trait core::ops::function::Fn">Fn</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.u64.html">u64</a>)</h4></section></summary><divclass="docblock"><p>Ensures that at least <code>additional</code> items can be inserted into the table
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.2/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 ensure that at least <code>additional</code> items can be inserted into
) -><aclass="struct"href="struct.Bucket.html"title="struct hashbrown::raw::Bucket">Bucket</a><T></h4></section></summary><divclass="docblock"><p>Inserts a new element into the table, and returns its raw bucket.</p>
<p>This does not check if the given element already exists in the table.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Bucket.html"title="struct hashbrown::raw::Bucket">Bucket</a><T>, T></h4></section></summary><divclass="docblock"><p>Attempts to insert a new element without growing the table and return its raw bucket.</p>
) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.reference.html">&mut T</a></h4></section></summary><divclass="docblock"><p>Inserts a new element into the table, and returns a mutable reference to it.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.insert_no_grow"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1362-1373">source</a><h4class="code-header">pub unsafe fn <ahref="#method.insert_no_grow"class="fn">insert_no_grow</a>(&mut self, hash: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.u64.html">u64</a>, value: T) -><aclass="struct"href="struct.Bucket.html"title="struct hashbrown::raw::Bucket">Bucket</a><T></h4></section></summary><divclass="docblock"><p>Inserts a new element into the table, without growing the table.</p>
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>(T) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/option/enum.Option.html"title="enum core::option::Option">Option</a><T>,</div></h4></section></summary><divclass="docblock"><p>Temporary removes a bucket, applying the given function to the removed
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Bucket.html"title="struct hashbrown::raw::Bucket">Bucket</a><T>, <aclass="struct"href="struct.InsertSlot.html"title="struct hashbrown::raw::InsertSlot">InsertSlot</a>></h4></section></summary><divclass="docblock"><p>Searches for an element in the table. If the element is not found,
) -><aclass="struct"href="struct.Bucket.html"title="struct hashbrown::raw::Bucket">Bucket</a><T></h4></section></summary><divclass="docblock"><p>Inserts a new element into the table in the given slot, and returns its
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1456-1475">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.77.2/core/primitive.u64.html">u64</a>, eq: impl <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.bool.html">bool</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="struct.Bucket.html"title="struct hashbrown::raw::Bucket">Bucket</a><T>></h4></section></summary><divclass="docblock"><p>Searches for an element in the table.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1479-1485">source</a><h4class="code-header">pub fn <ahref="#method.get"class="fn">get</a>(&self, hash: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.u64.html">u64</a>, eq: impl <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.bool.html">bool</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.reference.html">&T</a>></h4></section></summary><divclass="docblock"><p>Gets a reference to an element in the table.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.reference.html">&mut T</a>></h4></section></summary><divclass="docblock"><p>Gets a mutable reference to an element in the table.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/option/enum.Option.html"title="enum core::option::Option">Option</a><[<aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.reference.html">&mut T</a>; <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.array.html">N</a>]></h4></section></summary><divclass="docblock"><p>Attempts to get mutable references to <code>N</code> entries in the table at once.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/option/enum.Option.html"title="enum core::option::Option">Option</a><[<aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.reference.html">&mut T</a>; <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.array.html">N</a>]></h4></section><detailsclass="toggle method-toggle"open><summary><sectionid="method.capacity"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1559-1561">source</a><h4class="code-header">pub fn <ahref="#method.capacity"class="fn">capacity</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Returns the number of elements the map can hold without reallocating.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.len"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1565-1567">source</a><h4class="code-header">pub fn <ahref="#method.len"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/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/raw/mod.rs.html#1571-1573">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.77.2/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the table contains no elements.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.buckets"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1577-1579">source</a><h4class="code-header">pub fn <ahref="#method.buckets"class="fn">buckets</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Returns the number of buckets in the table.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_bucket_full"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1587-1589">source</a><h4class="code-header">pub unsafe fn <ahref="#method.is_bucket_full"class="fn">is_bucket_full</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Checks whether the bucket at <code>index</code> is full.</p>
<p>The caller must ensure <code>index</code> is less than the number of buckets.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.iter"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1596-1602">source</a><h4class="code-header">pub unsafe fn <ahref="#method.iter"class="fn">iter</a>(&self) -><aclass="struct"href="struct.RawIter.html"title="struct hashbrown::raw::RawIter">RawIter</a><T><ahref="#"class="tooltip"data-notable-ty="RawIter<T>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Returns an iterator over every element in the table. It is up to
the caller to ensure that the <code>RawTable</code> outlives the <code>RawIter</code>.
Because we cannot make the <code>next</code> method unsafe on the <code>RawIter</code>
struct, we have to make the <code>iter</code> method unsafe.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.iter_hash"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1615-1617">source</a><h4class="code-header">pub unsafe fn <ahref="#method.iter_hash"class="fn">iter_hash</a>(&self, hash: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/core/primitive.u64.html">u64</a>) -><aclass="struct"href="struct.RawIterHash.html"title="struct hashbrown::raw::RawIterHash">RawIterHash</a><T><ahref="#"class="tooltip"data-notable-ty="RawIterHash<T>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Returns an iterator over occupied buckets that could match a given hash.</p>
<p><code>RawTable</code> only stores 7 bits of the hash value, so this iterator may
return items that have a hash value different than the one provided. You
should always validate the returned values before using them.</p>
<p>It is up to the caller to ensure that the <code>RawTable</code> outlives the
<code>RawIterHash</code>. Because we cannot make the <code>next</code> method unsafe on the
<code>RawIterHash</code> struct, we have to make the <code>iter_hash</code> method unsafe.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.drain"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1622-1627">source</a><h4class="code-header">pub fn <ahref="#method.drain"class="fn">drain</a>(&mut self) -><aclass="struct"href="struct.RawDrain.html"title="struct hashbrown::raw::RawDrain">RawDrain</a><'_, T, A><ahref="#"class="tooltip"data-notable-ty="RawDrain<'_, T, A>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Returns an iterator which removes all elements from the table without
freeing the memory.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.drain_iter_from"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1637-1645">source</a><h4class="code-header">pub unsafe fn <ahref="#method.drain_iter_from"class="fn">drain_iter_from</a>(&mut self, iter: <aclass="struct"href="struct.RawIter.html"title="struct hashbrown::raw::RawIter">RawIter</a><T>) -><aclass="struct"href="struct.RawDrain.html"title="struct hashbrown::raw::RawDrain">RawDrain</a><'_, T, A><ahref="#"class="tooltip"data-notable-ty="RawDrain<'_, T, A>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Returns an iterator which removes all elements from the table without
freeing the memory.</p>
<p>Iteration starts at the provided iterator’s current location.</p>
<p>It is up to the caller to ensure that the iterator is valid for this
<code>RawTable</code> and covers all items that remain in the table.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_iter_from"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1653-1662">source</a><h4class="code-header">pub unsafe fn <ahref="#method.into_iter_from"class="fn">into_iter_from</a>(self, iter: <aclass="struct"href="struct.RawIter.html"title="struct hashbrown::raw::RawIter">RawIter</a><T>) -><aclass="struct"href="struct.RawIntoIter.html"title="struct hashbrown::raw::RawIntoIter">RawIntoIter</a><T, A><ahref="#"class="tooltip"data-notable-ty="RawIntoIter<T, A>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Returns an iterator which consumes all elements from the table.</p>
<p>Iteration starts at the provided iterator’s current location.</p>
<p>It is up to the caller to ensure that the iterator is valid for this
<code>RawTable</code> and covers all items that remain in the table.</p>
<code><ahref="https://doc.rust-lang.org/1.77.2/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.77.2/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.77.2/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.77.2/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.77.2/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.77.2/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.77.2/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.77.2/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.77.2/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.77.2/alloc/borrow/trait.ToOwned.html#method.clone_into"class="fn">clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/1.77.2/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.77.2/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.77.2/src/core/convert/mod.rs.html#804-806">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.77.2/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.77.2/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.77.2/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.77.2/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.77.2/src/core/convert/mod.rs.html#811">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.2/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.77.2/src/core/convert/mod.rs.html#789-791">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.77.2/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.77.2/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.77.2/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.2/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.77.2/src/core/convert/mod.rs.html#796">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.2/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.2/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.2/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">{"RawDrain<'_,T,A>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.RawDrain.html\"title=\"structhashbrown::raw::RawDrain\">RawDrain</a><'_,T,A></code></h3><pre><code><divclass=\"where\">impl<T,A:Allocator><aclass=\"trait\"href=\"https://doc.rust-lang.org/1.77.2/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a>for<aclass=\"struct\"href=\"struct.RawDrain.html\"title=\"structhashbrown::raw::RawDrain\">RawDrain</a><'_,T,A></div><divclass=\"where\">type<ahref=\"https://doc.rust-lang.org/1.77.2/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\"class=\"associatedtype\">Item</a>=T;</div>","RawIntoIter<T,A>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.RawIntoIter.html\"title=\"structhashbrown::raw::RawIntoIter\">RawIntoIter</a><T,A></code></h3><pre><code><divclass=\"where\">impl<T,A:Allocator><aclass=\"trait\"href=\"https://doc.rust-lang.org/1.77.2/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a>for<aclass=\"struct\"href=\"struct.RawIntoIter.html\"title=\"structhashbrown::raw::RawIntoIter\">RawIntoIter</a><T,A></div><divclass=\"where\">type<ahref=\"https://doc.rust-lang.org/1.77.2/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\"class=\"associatedtype\">Item</a>=T;</div>","RawIter<T>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.RawIter.html\"title=\"structhashbrown::raw::RawIter\">RawIter</a><T></code></h3><pre><code><divclass=\"where\">impl<T><aclass=\"trait\"href=\"https://doc.rust-lang.org/1.77.2/core/iter/traits/iterator/trait.Iterator.html\"title=\"traitcore::iter::traits::iterator::Iterator\">Iterator</a>for<aclass=\"struct\"href=\"struct.RawIter.html\"title=\"structhashbrown::raw::RawIter\">RawIter</a><T></div><divclass=\"where\">type<ahref=\"https://doc.rust-lang.org/1.77.2/core/ite