<!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><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><linkrel="stylesheet"href="../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../static.files/rustdoc-dd39b87e5fcfba68.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.80.0 (051478957 2024-07-21)"data-channel="1.80.0"data-search-js="search-d52510db62a78183.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../../static.files/storage-118b08c4c78b968e.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><linkrel="stylesheet"href="../../static.files/noscript-df360f571f6edeae.css"></noscript><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.5</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_empty</a></li><li><ahref="#method.iter">iter</a></li><li><ahref="#method.iter_hash">iter_hash</a></li><li><ahref="#method.len">len</a></li><li><ahref="#method.new">new</a></li><li><ahref="#method.new_in">new_in</a></li><li><ahref="#method.remove">remove</a></li><li><ahref="#method.remove_entry">remove_ent
</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.80.0/core/primitive.usize.html">usize</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/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.80.0/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
</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-1684">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
) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/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.80.0/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.80.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.data_end"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#921-940">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.80.0/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 table as viewed from
<p>The caller must ensure that the <code>RawTable</code> outlives the returned <ahref="https://doc.rust-lang.org/1.80.0/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#945-947">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.80.0/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#958-962">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.80.0/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.80.0/core/primitive.u8.html">u8</a>>, <aclass="struct"href="https://doc.rust-lang.org/1.80.0/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#966-968">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.80.0/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#995-1023">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.80.0/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#1035-1039">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#1045-1055">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.80.0/core/primitive.u64.html">u64</a>, eq: impl <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.bool.html">bool</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/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.80.0/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#1084-1086">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#1090-1103">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#1107-1168">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.80.0/core/primitive.usize.html">usize</a>, hasher: impl <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.Fn.html"title="trait core::ops::function::Fn">Fn</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/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#1173-1188">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.80.0/core/primitive.usize.html">usize</a>, hasher: impl <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.Fn.html"title="trait core::ops::function::Fn">Fn</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/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.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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 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.80.0/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.80.0/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#1360-1371">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.80.0/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.80.0/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>(T) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/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.80.0/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#1454-1473">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.80.0/core/primitive.u64.html">u64</a>, eq: impl <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.bool.html">bool</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/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#1477-1483">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.80.0/core/primitive.u64.html">u64</a>, eq: impl <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.bool.html">bool</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><[<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&mut T</a>; <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/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.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><[<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.reference.html">&mut T</a>; <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/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#1557-1559">source</a><h4class="code-header">pub fn <ahref="#method.capacity"class="fn">capacity</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/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#1563-1565">source</a><h4class="code-header">pub fn <ahref="#method.len"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.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/raw/mod.rs.html#1569-1571">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.80.0/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#1575-1577">source</a><h4class="code-header">pub fn <ahref="#method.buckets"class="fn">buckets</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/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#1585-1587">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.80.0/core/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/core/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Checks whether the bucket at <code>index</code> is full.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.iter"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1594-1600">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
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.iter_hash"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1613-1615">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.80.0/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>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.drain"class="method"><aclass="src rightside"href="../../src/hashbrown/raw/mod.rs.html#1620-1625">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
</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#1635-1643">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
</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#1651-1660">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>
<code><ahref="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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.80.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"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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.80.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.80.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.80.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-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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.80.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.80.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.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.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.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">{"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.80.0/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.80.0/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.80.0/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.80.0/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.80.0/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.80.0/core