Adding large folders

This commit is contained in:
2026-02-26 12:00:21 -05:00
parent 5400d82acd
commit 49701c85ad
47332 changed files with 1942573 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Opt-in access to the experimental raw entry API."><title>indexmap::map::raw_entry_v1 - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="indexmap" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module raw_entry_v1</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../indexmap/index.html">indexmap</a><span class="version">2.13.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module raw_<wbr>entry_<wbr>v1</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In indexmap::<wbr>map</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">indexmap</a>::<wbr><a href="../index.html">map</a></div><h1>Module <span>raw_<wbr>entry_<wbr>v1</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/indexmap/map/raw_entry_v1.rs.html#1-636">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Opt-in access to the experimental raw entry API.</p>
<p>This module is designed to mimic the raw entry API of <a href="https://doc.rust-lang.org/1.93.1/std/collections/hash_map/index.html" title="mod std::collections::hash_map"><code>HashMap</code></a>,
matching its unstable state as of Rust 1.75. See the tracking issue
<a href="https://github.com/rust-lang/rust/issues/56167">rust#56167</a> for more details.</p>
<p>The trait <a href="trait.RawEntryApiV1.html" title="trait indexmap::map::raw_entry_v1::RawEntryApiV1"><code>RawEntryApiV1</code></a> and the <code>_v1</code> suffix on its methods are meant to insulate this for
the future, in case later breaking changes are needed. If the standard library stabilizes its
<code>hash_raw_entry</code> feature (or some replacement), matching <em>inherent</em> methods will be added to
<code>IndexMap</code> without such an opt-in trait.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.RawEntryBuilder.html" title="struct indexmap::map::raw_entry_v1::RawEntryBuilder">RawEntry<wbr>Builder</a></dt><dd>A builder for computing where in an <a href="../struct.IndexMap.html" title="struct indexmap::map::IndexMap"><code>IndexMap</code></a> a key-value pair would be stored.</dd><dt><a class="struct" href="struct.RawEntryBuilderMut.html" title="struct indexmap::map::raw_entry_v1::RawEntryBuilderMut">RawEntry<wbr>Builder<wbr>Mut</a></dt><dd>A builder for computing where in an <a href="../struct.IndexMap.html" title="struct indexmap::map::IndexMap"><code>IndexMap</code></a> a key-value pair would be stored.</dd><dt><a class="struct" href="struct.RawOccupiedEntryMut.html" title="struct indexmap::map::raw_entry_v1::RawOccupiedEntryMut">RawOccupied<wbr>Entry<wbr>Mut</a></dt><dd>A raw view into an occupied entry in an <a href="../struct.IndexMap.html" title="struct indexmap::map::IndexMap"><code>IndexMap</code></a>.
It is part of the <a href="enum.RawEntryMut.html" title="enum indexmap::map::raw_entry_v1::RawEntryMut"><code>RawEntryMut</code></a> enum.</dd><dt><a class="struct" href="struct.RawVacantEntryMut.html" title="struct indexmap::map::raw_entry_v1::RawVacantEntryMut">RawVacant<wbr>Entry<wbr>Mut</a></dt><dd>A view into a vacant raw entry in an <a href="../struct.IndexMap.html" title="struct indexmap::map::IndexMap"><code>IndexMap</code></a>.
It is part of the <a href="enum.RawEntryMut.html" title="enum indexmap::map::raw_entry_v1::RawEntryMut"><code>RawEntryMut</code></a> enum.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.RawEntryMut.html" title="enum indexmap::map::raw_entry_v1::RawEntryMut">RawEntry<wbr>Mut</a></dt><dd>Raw entry for an existing key-value pair or a vacant location to
insert one.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.RawEntryApiV1.html" title="trait indexmap::map::raw_entry_v1::RawEntryApiV1">RawEntry<wbr>ApiV1</a></dt><dd>Opt-in access to the experimental raw entry API.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["RawEntryMut"],"struct":["RawEntryBuilder","RawEntryBuilderMut","RawOccupiedEntryMut","RawVacantEntryMut"],"trait":["RawEntryApiV1"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,124 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Opt-in access to the experimental raw entry API."><title>RawEntryApiV1 in indexmap::map::raw_entry_v1 - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="indexmap" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">RawEntryApiV1</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../indexmap/index.html">indexmap</a><span class="version">2.13.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawEntry<wbr>ApiV1</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.raw_entry_mut_v1" title="raw_entry_mut_v1">raw_entry_mut_v1</a></li><li><a href="#tymethod.raw_entry_v1" title="raw_entry_v1">raw_entry_v1</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In indexmap::<wbr>map::<wbr>raw_<wbr>entry_<wbr>v1</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">indexmap</a>::<wbr><a href="../index.html">map</a>::<wbr><a href="index.html">raw_entry_v1</a></div><h1>Trait <span class="trait">RawEntry<wbr>ApiV1</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/indexmap/map/raw_entry_v1.rs.html#23-159">Source</a> </span></div><pre class="rust item-decl"><code>pub trait RawEntryApiV1&lt;K, V, S&gt;: Sealed {
// Required methods
fn <a href="#tymethod.raw_entry_v1" class="fn">raw_entry_v1</a>(&amp;self) -&gt; <a class="struct" href="struct.RawEntryBuilder.html" title="struct indexmap::map::raw_entry_v1::RawEntryBuilder">RawEntryBuilder</a>&lt;'_, K, V, S&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.raw_entry_mut_v1" class="fn">raw_entry_mut_v1</a>(&amp;mut self) -&gt; <a class="struct" href="struct.RawEntryBuilderMut.html" title="struct indexmap::map::raw_entry_v1::RawEntryBuilderMut">RawEntryBuilderMut</a>&lt;'_, K, V, S&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Opt-in access to the experimental raw entry API.</p>
<p>See the <a href="index.html" title="mod indexmap::map::raw_entry_v1"><code>raw_entry_v1</code></a> module documentation for more information.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.raw_entry_v1" class="method"><a class="src rightside" href="../../../src/indexmap/map/raw_entry_v1.rs.html#66">Source</a><h4 class="code-header">fn <a href="#tymethod.raw_entry_v1" class="fn">raw_entry_v1</a>(&amp;self) -&gt; <a class="struct" href="struct.RawEntryBuilder.html" title="struct indexmap::map::raw_entry_v1::RawEntryBuilder">RawEntryBuilder</a>&lt;'_, K, V, S&gt;</h4></section></summary><div class="docblock"><p>Creates a raw immutable entry builder for the <a href="../struct.IndexMap.html" title="struct indexmap::map::IndexMap"><code>IndexMap</code></a>.</p>
<p>Raw entries provide the lowest level of control for searching and
manipulating a map. They must be manually initialized with a hash and
then manually searched.</p>
<p>This is useful for</p>
<ul>
<li>Hash memoization</li>
<li>Using a search key that doesnt work with the <a href="../../trait.Equivalent.html" title="trait indexmap::Equivalent"><code>Equivalent</code></a> trait</li>
<li>Using custom comparison logic without newtype wrappers</li>
</ul>
<p>Unless you are in such a situation, higher-level and more foolproof APIs like
<a href="../struct.IndexMap.html#method.get" title="method indexmap::map::IndexMap::get"><code>get</code></a> should be preferred.</p>
<p>Immutable raw entries have very limited use; you might instead want
<a href="trait.RawEntryApiV1.html#tymethod.raw_entry_mut_v1"><code>raw_entry_mut_v1</code></a>.</p>
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>core::hash::BuildHasher;
<span class="kw">use </span>indexmap::map::{IndexMap, RawEntryApiV1};
<span class="kw">let </span><span class="kw-2">mut </span>map = IndexMap::new();
map.extend([(<span class="string">"a"</span>, <span class="number">100</span>), (<span class="string">"b"</span>, <span class="number">200</span>), (<span class="string">"c"</span>, <span class="number">300</span>)]);
<span class="kw">for </span>k <span class="kw">in </span>[<span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"c"</span>, <span class="string">"d"</span>, <span class="string">"e"</span>, <span class="string">"f"</span>] {
<span class="kw">let </span>hash = map.hasher().hash_one(k);
<span class="kw">let </span>i = map.get_index_of(k);
<span class="kw">let </span>v = map.get(k);
<span class="kw">let </span>kv = map.get_key_value(k);
<span class="kw">let </span>ikv = map.get_full(k);
<span class="macro">println!</span>(<span class="string">"Key: {} and value: {:?}"</span>, k, v);
<span class="macro">assert_eq!</span>(map.raw_entry_v1().from_key(k), kv);
<span class="macro">assert_eq!</span>(map.raw_entry_v1().from_hash(hash, |q| <span class="kw-2">*</span>q == k), kv);
<span class="macro">assert_eq!</span>(map.raw_entry_v1().from_key_hashed_nocheck(hash, k), kv);
<span class="macro">assert_eq!</span>(map.raw_entry_v1().from_hash_full(hash, |q| <span class="kw-2">*</span>q == k), ikv);
<span class="macro">assert_eq!</span>(map.raw_entry_v1().index_from_hash(hash, |q| <span class="kw-2">*</span>q == k), i);
}</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="tymethod.raw_entry_mut_v1" class="method"><a class="src rightside" href="../../../src/indexmap/map/raw_entry_v1.rs.html#158">Source</a><h4 class="code-header">fn <a href="#tymethod.raw_entry_mut_v1" class="fn">raw_entry_mut_v1</a>(&amp;mut self) -&gt; <a class="struct" href="struct.RawEntryBuilderMut.html" title="struct indexmap::map::raw_entry_v1::RawEntryBuilderMut">RawEntryBuilderMut</a>&lt;'_, K, V, S&gt;</h4></section></summary><div class="docblock"><p>Creates a raw entry builder for the <a href="../struct.IndexMap.html" title="struct indexmap::map::IndexMap"><code>IndexMap</code></a>.</p>
<p>Raw entries provide the lowest level of control for searching and
manipulating a map. They must be manually initialized with a hash and
then manually searched. After this, insertions into a vacant entry
still require an owned key to be provided.</p>
<p>Raw entries are useful for such exotic situations as:</p>
<ul>
<li>Hash memoization</li>
<li>Deferring the creation of an owned key until it is known to be required</li>
<li>Using a search key that doesnt work with the <a href="../../trait.Equivalent.html" title="trait indexmap::Equivalent"><code>Equivalent</code></a> trait</li>
<li>Using custom comparison logic without newtype wrappers</li>
</ul>
<p>Because raw entries provide much more low-level control, its much easier
to put the <code>IndexMap</code> into an inconsistent state which, while memory-safe,
will cause the map to produce seemingly random results. Higher-level and more
foolproof APIs like <a href="../struct.IndexMap.html#method.entry" title="method indexmap::map::IndexMap::entry"><code>entry</code></a> should be preferred when possible.</p>
<p>Raw entries give mutable access to the keys. This must not be used
to modify how the key would compare or hash, as the map will not re-evaluate
where the key should go, meaning the keys may become “lost” if their
location does not reflect their state. For instance, if you change a key
so that the map now contains keys which compare equal, search may start
acting erratically, with two keys randomly masking each other. Implementations
are free to assume this doesnt happen (within the limits of memory-safety).</p>
<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>core::hash::BuildHasher;
<span class="kw">use </span>indexmap::map::{IndexMap, RawEntryApiV1};
<span class="kw">use </span>indexmap::map::raw_entry_v1::RawEntryMut;
<span class="kw">let </span><span class="kw-2">mut </span>map = IndexMap::new();
map.extend([(<span class="string">"a"</span>, <span class="number">100</span>), (<span class="string">"b"</span>, <span class="number">200</span>), (<span class="string">"c"</span>, <span class="number">300</span>)]);
<span class="comment">// Existing key (insert and update)
</span><span class="kw">match </span>map.raw_entry_mut_v1().from_key(<span class="string">"a"</span>) {
RawEntryMut::Vacant(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
RawEntryMut::Occupied(<span class="kw-2">mut </span>view) =&gt; {
<span class="macro">assert_eq!</span>(view.index(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(view.get(), <span class="kw-2">&amp;</span><span class="number">100</span>);
<span class="kw">let </span>v = view.get_mut();
<span class="kw">let </span>new_v = (<span class="kw-2">*</span>v) * <span class="number">10</span>;
<span class="kw-2">*</span>v = new_v;
<span class="macro">assert_eq!</span>(view.insert(<span class="number">1111</span>), <span class="number">1000</span>);
}
}
<span class="macro">assert_eq!</span>(map[<span class="string">"a"</span>], <span class="number">1111</span>);
<span class="macro">assert_eq!</span>(map.len(), <span class="number">3</span>);
<span class="comment">// Existing key (take)
</span><span class="kw">let </span>hash = map.hasher().hash_one(<span class="string">"c"</span>);
<span class="kw">match </span>map.raw_entry_mut_v1().from_key_hashed_nocheck(hash, <span class="string">"c"</span>) {
RawEntryMut::Vacant(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
RawEntryMut::Occupied(view) =&gt; {
<span class="macro">assert_eq!</span>(view.index(), <span class="number">2</span>);
<span class="macro">assert_eq!</span>(view.shift_remove_entry(), (<span class="string">"c"</span>, <span class="number">300</span>));
}
}
<span class="macro">assert_eq!</span>(map.raw_entry_v1().from_key(<span class="string">"c"</span>), <span class="prelude-val">None</span>);
<span class="macro">assert_eq!</span>(map.len(), <span class="number">2</span>);
<span class="comment">// Nonexistent key (insert and update)
</span><span class="kw">let </span>key = <span class="string">"d"</span>;
<span class="kw">let </span>hash = map.hasher().hash_one(key);
<span class="kw">match </span>map.raw_entry_mut_v1().from_hash(hash, |q| <span class="kw-2">*</span>q == key) {
RawEntryMut::Occupied(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
RawEntryMut::Vacant(view) =&gt; {
<span class="macro">assert_eq!</span>(view.index(), <span class="number">2</span>);
<span class="kw">let </span>(k, value) = view.insert(<span class="string">"d"</span>, <span class="number">4000</span>);
<span class="macro">assert_eq!</span>((<span class="kw-2">*</span>k, <span class="kw-2">*</span>value), (<span class="string">"d"</span>, <span class="number">4000</span>));
<span class="kw-2">*</span>value = <span class="number">40000</span>;
}
}
<span class="macro">assert_eq!</span>(map[<span class="string">"d"</span>], <span class="number">40000</span>);
<span class="macro">assert_eq!</span>(map.len(), <span class="number">3</span>);
<span class="kw">match </span>map.raw_entry_mut_v1().from_hash(hash, |q| <span class="kw-2">*</span>q == key) {
RawEntryMut::Vacant(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
RawEntryMut::Occupied(view) =&gt; {
<span class="macro">assert_eq!</span>(view.index(), <span class="number">2</span>);
<span class="macro">assert_eq!</span>(view.swap_remove_entry(), (<span class="string">"d"</span>, <span class="number">40000</span>));
}
}
<span class="macro">assert_eq!</span>(map.get(<span class="string">"d"</span>), <span class="prelude-val">None</span>);
<span class="macro">assert_eq!</span>(map.len(), <span class="number">2</span>);</code></pre></div></div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-RawEntryApiV1%3CK,+V,+S%3E-for-IndexMap%3CK,+V,+S%3E" class="impl"><a class="src rightside" href="../../../src/indexmap/map/raw_entry_v1.rs.html#161-169">Source</a><a href="#impl-RawEntryApiV1%3CK,+V,+S%3E-for-IndexMap%3CK,+V,+S%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K, V, S&gt; <a class="trait" href="trait.RawEntryApiV1.html" title="trait indexmap::map::raw_entry_v1::RawEntryApiV1">RawEntryApiV1</a>&lt;K, V, S&gt; for <a class="struct" href="../struct.IndexMap.html" title="struct indexmap::map::IndexMap">IndexMap</a>&lt;K, V, S&gt;</h3></section></div><script src="../../../trait.impl/indexmap/map/raw_entry_v1/trait.RawEntryApiV1.js" async></script></section></div></main></body></html>