<!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 hash set where the iteration order of the values is independent of their hash values."><title>IndexSet in indexmap::set - 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="indexmap"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="../../indexmap/index.html">indexmap</a><spanclass="version">2.2.6</span></h2></div><h2class="location"><ahref="#">IndexSet</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.as_slice">as_slice</a></li><li><ahref="#method.binary_search">binary_search</a></li><li><ahref="#method.binary_search_by">binary_search_by</a></li><li><ahref="#method.binary_search_by_key">binary_search_by_key</a></li><li><ahref="#method.capacity">capacity</a></li><li><ahref="#method.clear">clear</a></li><li><ahref="#method.contains">contains</a></li><li><ahref="#method.difference">difference</a></li><li><ahref="#method.drain">drain</a></li><li><ahref="#method.first">first</a></li><li><ahref="#method.get">get</a></li><li><ahref="#method.get_full">get_full</a></li><li><ahref="#method.get_index">get_index</a></li><li><ahref="#method.get_index_of">get_index_of</a></li><li><ahref="#method.get_range">get_range</a></li><li><ahref="#method.hasher">hasher</a></li><li><ahref="#method.insert">insert</a></li><li><ahref="#method.insert_full">insert_full</a></li><li><ahref="#method.insert_sorted">insert_sorted</a></li><li><ahref="#method.intersection">intersection</a></li><li><ahref="#method.into_boxed_slice">into_boxed_slice</a></li><li><ahref="#method.is_disjoint">is_disjoint</a></li><li><ahref="#method.is_empty">is_empty</a></li><li><ahref="#method.is_subset">is_subset</a></li><li><ahref="#method.is_superset">is_superset</a></li><li><ahref="#method.iter">iter</a></li><li><ahref="#method.last">last</a></li><li><ahref="#method.len">len</a></li><li><ahref="#method.move_index">move_index</a></li><li><ahref="#method.new">new</a></li><li><ahref="#method.partition_point">partition_point</a></li><li><ahref="#method.pop">pop</a></li><li><ahref="#method.remove">remove</a></li><li><ahref="#method.replace">replace</a></li><li><ahref="#method.replace_full">replace_full</a></li><li><ahref="#method.
<p>The values have a consistent order that is determined by the sequence of
insertion and removal calls on the set. The order does not depend on the
values or the hash function at all. Note that insertion order and value
are not affected if a re-insertion is attempted once an element is
already present.</p>
<p>All iterators traverse the set <em>in order</em>. Set operation iterators like
<ahref="struct.IndexSet.html#method.union"title="method indexmap::set::IndexSet::union"><code>IndexSet::union</code></a> produce a concatenated order, as do their matching “bitwise”
operators. See their documentation for specifics.</p>
<p>The insertion order is preserved, with <strong>notable exceptions</strong> like the
<ahref="struct.IndexSet.html#method.remove"title="method indexmap::set::IndexSet::remove"><code>.remove()</code></a> or <ahref="struct.IndexSet.html#method.swap_remove"title="method indexmap::set::IndexSet::swap_remove"><code>.swap_remove()</code></a> methods.
Methods such as <ahref="struct.IndexSet.html#method.sort_by"title="method indexmap::set::IndexSet::sort_by"><code>.sort_by()</code></a> of
course result in a new order, depending on the sorting order.</p>
<p>Internally, <code>IndexSet<T, S></code> just holds an <ahref="../map/struct.IndexMap.html"title="struct indexmap::map::IndexMap"><code>IndexMap<T, (), S></code></a>. Thus the complexity
<spanclass="comment">// Collects which letters appear in a sentence.
</span><spanclass="kw">let </span>letters: IndexSet<<spanclass="kw">_</span>> = <spanclass="string">"a short treatise on fungi"</span>.chars().collect();
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.with_capacity"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#164-168">source</a><h4class="code-header">pub fn <ahref="#method.with_capacity"class="fn">with_capacity</a>(n: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><divclass="docblock"><p>Create a new set with capacity for <code>n</code> elements.
</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-IndexSet%3CT,+S%3E"class="impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#171-327">source</a><ahref="#impl-IndexSet%3CT,+S%3E"class="anchor">§</a><h3class="code-header">impl<T, S><aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.with_capacity_and_hasher"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#176-180">source</a><h4class="code-header">pub fn <ahref="#method.with_capacity_and_hasher"class="fn">with_capacity_and_hasher</a>(n: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>, hash_builder: S) -> Self</h4></section></summary><divclass="docblock"><p>Create a new set with capacity for <code>n</code> elements.
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.with_hasher"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#186-190">source</a><h4class="code-header">pub const fn <ahref="#method.with_hasher"class="fn">with_hasher</a>(hash_builder: S) -> Self</h4></section></summary><divclass="docblock"><p>Create a new set with <code>hash_builder</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.capacity"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#198-200">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/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Return the number of elements the set can hold without reallocating.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.hasher"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#203-205">source</a><h4class="code-header">pub fn <ahref="#method.hasher"class="fn">hasher</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&S</a></h4></section></summary><divclass="docblock"><p>Return a reference to the set’s <code>BuildHasher</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.len"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#210-212">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/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Return the number of elements in the set.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_empty"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#217-219">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/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns true if the set contains no elements.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.iter"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#222-224">source</a><h4class="code-header">pub fn <ahref="#method.iter"class="fn">iter</a>(&self) -><aclass="struct"href="struct.Iter.html"title="struct indexmap::set::Iter">Iter</a><'_, T><ahref="#"class="tooltip"data-notable-ty="Iter<'_, T>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Return an iterator over the values of the set, in their order</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clear"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#229-231">source</a><h4class="code-header">pub fn <ahref="#method.clear"class="fn">clear</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Remove all elements in the set, while preserving its capacity.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.truncate"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#236-238">source</a><h4class="code-header">pub fn <ahref="#method.truncate"class="fn">truncate</a>(&mut self, len: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Shortens the set, keeping the first <code>len</code> elements and dropping the rest.</p>
R: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/range/trait.RangeBounds.html"title="trait core::ops::range::RangeBounds">RangeBounds</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>>,</div></h4></section></summary><divclass="docblock"><p>Clears the <code>IndexSet</code> in the given index range, returning those values
<p>The range may be any type that implements <ahref="https://doc.rust-lang.org/1.80.0/core/ops/range/trait.RangeBounds.html"title="trait core::ops::range::RangeBounds"><code>RangeBounds<usize></code></a>,
S: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><divclass="docblock"><p>Splits the collection into two at the given index.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reserve_exact"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#291-293">source</a><h4class="code-header">pub fn <ahref="#method.reserve_exact"class="fn">reserve_exact</a>(&mut self, additional: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Reserve capacity for <code>additional</code> more values, without over-allocating.</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="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <aclass="struct"href="../struct.TryReserveError.html"title="struct indexmap::TryReserveError">TryReserveError</a>></h4></section></summary><divclass="docblock"><p>Try to reserve capacity for <code>additional</code> more values, without over-allocating.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.shrink_to_fit"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#317-319">source</a><h4class="code-header">pub fn <ahref="#method.shrink_to_fit"class="fn">shrink_to_fit</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Shrink the capacity of the set as much as possible.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.shrink_to"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#324-326">source</a><h4class="code-header">pub fn <ahref="#method.shrink_to"class="fn">shrink_to</a>(&mut self, min_capacity: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Shrink the capacity of the set with a lower limit.</p>
S: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.insert"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#342-344">source</a><h4class="code-header">pub fn <ahref="#method.insert"class="fn">insert</a>(&mut self, value: T) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Insert the value into the set.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.insert_full"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#355-358">source</a><h4class="code-header">pub fn <ahref="#method.insert_full"class="fn">insert_full</a>(&mut self, value: T) -> (<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>)</h4></section></summary><divclass="docblock"><p>Insert the value into the set, and get its index.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Insert the value into the set at its ordered position among sorted values.</p>
<p>This is equivalent to finding the position with
<ahref="struct.IndexSet.html#method.binary_search"title="method indexmap::set::IndexSet::binary_search"><code>binary_search</code></a>, and if needed calling
<ahref="struct.IndexSet.html#method.shift_insert"title="method indexmap::set::IndexSet::shift_insert"><code>shift_insert</code></a> for a new value.</p>
<p>If the sorted item is found in the set, it returns the index of that
existing item and <code>false</code>, without any change. Otherwise, it inserts the
new item and returns its sorted index and <code>true</code>.</p>
<p>If the existing items are <strong>not</strong> already sorted, then the insertion
index is unspecified (like <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.slice.html#method.binary_search"title="method slice::binary_search"><code>slice::binary_search</code></a>), but the value
is moved to or inserted at that position regardless.</p>
<p>Computes in <strong>O(n)</strong> time (average). Instead of repeating calls to
<code>insert_sorted</code>, it may be faster to call batched <ahref="struct.IndexSet.html#method.insert"title="method indexmap::set::IndexSet::insert"><code>insert</code></a>
or <ahref="struct.IndexSet.html#method.extend"title="method indexmap::set::IndexSet::extend"><code>extend</code></a> and only call <ahref="struct.IndexSet.html#method.sort"title="method indexmap::set::IndexSet::sort"><code>sort</code></a> or
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.shift_insert"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#396-398">source</a><h4class="code-header">pub fn <ahref="#method.shift_insert"class="fn">shift_insert</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>, value: T) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Insert the value into the set at the given index.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.replace"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#405-407">source</a><h4class="code-header">pub fn <ahref="#method.replace"class="fn">replace</a>(&mut self, value: 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></h4></section></summary><divclass="docblock"><p>Adds a value to the set, replacing the existing value, if any, that is
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.replace_full"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#414-420">source</a><h4class="code-header">pub fn <ahref="#method.replace_full"class="fn">replace_full</a>(&mut self, value: T) -> (<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>, <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>Adds a value to the set, replacing the existing value, if any, that is
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h4></section></summary><divclass="docblock"><p>Return an iterator over the values that are in <code>self</code> but not <code>other</code>.</p>
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h4></section></summary><divclass="docblock"><p>Return an iterator over the values that are in <code>self</code> or <code>other</code>,
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h4></section></summary><divclass="docblock"><p>Return an iterator over the values that are in both <code>self</code> and <code>other</code>.</p>
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h4></section></summary><divclass="docblock"><p>Return an iterator over all values that are in <code>self</code> or <code>other</code>.</p>
I: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,</div></h4></section></summary><divclass="docblock"><p>Creates a splicing iterator that replaces the specified range in the set
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section></summary><divclass="docblock"><p>Return <code>true</code> if an equivalent to <code>value</code> exists in the set.</p>
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section></summary><divclass="docblock"><p>Return a reference to the value stored in the set, if it is present,
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section></summary><divclass="docblock"><p>Return item index, if it exists in the set</p>
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated: <code>remove</code> disrupts the set order – use <code>swap_remove</code> or <code>shift_remove</code> for explicit behavior.</span></div></span></summary><divclass="docblock"><p>Remove the value from the set, and return <code>true</code> if it was present.</p>
<p><strong>NOTE:</strong> This is equivalent to <ahref="struct.IndexSet.html#method.swap_remove"title="method indexmap::set::IndexSet::swap_remove"><code>.swap_remove(value)</code></a>, replacing this
value’s position with the last element, and it is deprecated in favor of calling that
explicitly. If you need to preserve the relative order of the values in the set, use
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section></summary><divclass="docblock"><p>Remove the value from the set, and return <code>true</code> if it was present.</p>
<p>Like <ahref="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html#method.swap_remove"title="method alloc::vec::Vec::swap_remove"><code>Vec::swap_remove</code></a>, the value is removed by swapping it with the
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section></summary><divclass="docblock"><p>Remove the value from the set, and return <code>true</code> if it was present.</p>
<p>Like <ahref="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html#method.remove"title="method alloc::vec::Vec::remove"><code>Vec::remove</code></a>, the value is removed by shifting all of the
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated: <code>take</code> disrupts the set order – use <code>swap_take</code> or <code>shift_take</code> for explicit behavior.</span></div></span></summary><divclass="docblock"><p>Removes and returns the value in the set, if any, that is equal to the
<p><strong>NOTE:</strong> This is equivalent to <ahref="struct.IndexSet.html#method.swap_take"title="method indexmap::set::IndexSet::swap_take"><code>.swap_take(value)</code></a>, replacing this
value’s position with the last element, and it is deprecated in favor of calling that
explicitly. If you need to preserve the relative order of the values in the set, use
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section></summary><divclass="docblock"><p>Removes and returns the value in the set, if any, that is equal to the
<p>Like <ahref="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html#method.swap_remove"title="method alloc::vec::Vec::swap_remove"><code>Vec::swap_remove</code></a>, the value is removed by swapping it with the
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section></summary><divclass="docblock"><p>Removes and returns the value in the set, if any, that is equal to the
<p>Like <ahref="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html#method.remove"title="method alloc::vec::Vec::remove"><code>Vec::remove</code></a>, the value is removed by shifting all of the
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section></summary><divclass="docblock"><p>Remove the value from the set return it and the index it had.</p>
<p>Like <ahref="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html#method.swap_remove"title="method alloc::vec::Vec::swap_remove"><code>Vec::swap_remove</code></a>, the value is removed by swapping it with the
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section></summary><divclass="docblock"><p>Remove the value from the set return it and the index it had.</p>
<p>Like <ahref="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html#method.remove"title="method alloc::vec::Vec::remove"><code>Vec::remove</code></a>, the value is removed by shifting all of the
F: <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/std/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Scan through each value in the set and keep those where the
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Sort the set’s values by their default ordering.</p>
<p>This is a stable sort – but equivalent values should not normally coexist in
a set at all, so <ahref="struct.IndexSet.html#method.sort_unstable"title="method indexmap::set::IndexSet::sort_unstable"><code>sort_unstable</code></a> is preferred
because it is generally faster and doesn’t allocate auxiliary memory.</p>
<p>See <ahref="struct.IndexSet.html#method.sort_by"title="method indexmap::set::IndexSet::sort_by"><code>sort_by</code></a> for details.</p>
F: <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/std/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><divclass="docblock"><p>Sort the set’s values in place using the comparison function <code>cmp</code>.</p>
F: <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/std/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><divclass="docblock"><p>Sort the values of the set and return a by-value iterator of
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Sort the set’s values by their default ordering.</p>
<p>See <ahref="struct.IndexSet.html#method.sort_unstable_by"title="method indexmap::set::IndexSet::sort_unstable_by"><code>sort_unstable_by</code></a> for details.</p>
F: <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/std/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><divclass="docblock"><p>Sort the set’s values in place using the comparison function <code>cmp</code>.</p>
F: <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/std/primitive.reference.html">&T</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><divclass="docblock"><p>Sort the values of the set and return a by-value iterator of
F: <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/std/primitive.reference.html">&T</a>) -> K,</div></h4></section></summary><divclass="docblock"><p>Sort the set’s values in place using a key extraction function.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Search over a sorted set for a value.</p>
to maintain the sort. See <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.slice.html#method.binary_search"title="method slice::binary_search"><code>slice::binary_search</code></a> for more details.</p>
<p>Computes in <strong>O(log(n))</strong> time, which is notably less scalable than looking the value up
using <ahref="struct.IndexSet.html#method.get_index_of"title="method indexmap::set::IndexSet::get_index_of"><code>get_index_of</code></a>, but this can also position missing values.</p>
F: <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/std/primitive.reference.html">&'a T</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><divclass="docblock"><p>Search over a sorted set with a comparator function.</p>
to maintain the sort. See <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.slice.html#method.binary_search_by"title="method slice::binary_search_by"><code>slice::binary_search_by</code></a> for more details.</p>
B: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><divclass="docblock"><p>Search over a sorted set with an extraction function.</p>
to maintain the sort. See <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.slice.html#method.binary_search_by_key"title="method slice::binary_search_by_key"><code>slice::binary_search_by_key</code></a> for more details.</p>
P: <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/std/primitive.reference.html">&T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Returns the index of the partition point of a sorted set according to the given predicate
<p>See <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.slice.html#method.partition_point"title="method slice::partition_point"><code>slice::partition_point</code></a> for more details.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reverse"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#845-847">source</a><h4class="code-header">pub fn <ahref="#method.reverse"class="fn">reverse</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Reverses the order of the set’s values in place.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_slice"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#852-854">source</a><h4class="code-header">pub fn <ahref="#method.as_slice"class="fn">as_slice</a>(&self) ->&<aclass="struct"href="struct.Slice.html"title="struct indexmap::set::Slice">Slice</a><T></h4></section></summary><divclass="docblock"><p>Returns a slice of all the values in the set.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_boxed_slice"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#859-861">source</a><h4class="code-header">pub fn <ahref="#method.into_boxed_slice"class="fn">into_boxed_slice</a>(self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/boxed/struct.Box.html"title="struct alloc::boxed::Box">Box</a><<aclass="struct"href="struct.Slice.html"title="struct indexmap::set::Slice">Slice</a><T>></h4></section></summary><divclass="docblock"><p>Converts into a boxed slice of all the values in the set.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_index"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#868-870">source</a><h4class="code-header">pub fn <ahref="#method.get_index"class="fn">get_index</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</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/std/primitive.reference.html">&T</a>></h4></section></summary><divclass="docblock"><p>Get a value by index</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_range"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#877-881">source</a><h4class="code-header">pub fn <ahref="#method.get_range"class="fn">get_range</a><R: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/range/trait.RangeBounds.html"title="trait core::ops::range::RangeBounds">RangeBounds</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>>>(&self, range: R) -><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.Slice.html"title="struct indexmap::set::Slice">Slice</a><T>></h4></section></summary><divclass="docblock"><p>Returns a slice of values in the given range of indices.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.first"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#886-888">source</a><h4class="code-header">pub fn <ahref="#method.first"class="fn">first</a>(&self) -><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/std/primitive.reference.html">&T</a>></h4></section></summary><divclass="docblock"><p>Get the first value</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.last"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#893-895">source</a><h4class="code-header">pub fn <ahref="#method.last"class="fn">last</a>(&self) -><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/std/primitive.reference.html">&T</a>></h4></section></summary><divclass="docblock"><p>Get the last value</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.swap_remove_index"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#906-908">source</a><h4class="code-header">pub fn <ahref="#method.swap_remove_index"class="fn">swap_remove_index</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -><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>Remove the value by index</p>
<p>Like <ahref="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html#method.swap_remove"title="method alloc::vec::Vec::swap_remove"><code>Vec::swap_remove</code></a>, the value is removed by swapping it with the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.shift_remove_index"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#919-921">source</a><h4class="code-header">pub fn <ahref="#method.shift_remove_index"class="fn">shift_remove_index</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -><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>Remove the value by index</p>
<p>Like <ahref="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html#method.remove"title="method alloc::vec::Vec::remove"><code>Vec::remove</code></a>, the value is removed by shifting all of the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.move_index"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#932-934">source</a><h4class="code-header">pub fn <ahref="#method.move_index"class="fn">move_index</a>(&mut self, from: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>, to: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Moves the position of a value from one index to another
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.swap_indices"class="method"><aclass="src rightside"href="../../src/indexmap/set.rs.html#941-943">source</a><h4class="code-header">pub fn <ahref="#method.swap_indices"class="fn">swap_indices</a>(&mut self, a: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>, b: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Swaps the position of two values in the set.</p>
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if <code>self</code> has no elements in common with <code>other</code>.</p>
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if all elements of <code>self</code> are contained in <code>other</code>.</p>
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if all elements of <code>other</code> are contained in <code>self</code>.</p>
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.bitand"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#1116-1118">source</a><ahref="#method.bitand"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/ops/bit/trait.BitAnd.html#tymethod.bitand"class="fn">bitand</a>(self, other: &<aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> Self::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/ops/bit/trait.BitAnd.html#associatedtype.Output"title="type core::ops::bit::BitAnd::Output">Output</a></h4></section></summary><divclass="docblock"><p>Returns the set intersection, cloned into a new set.</p>
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.bitor"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#1133-1135">source</a><ahref="#method.bitor"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/ops/bit/trait.BitOr.html#tymethod.bitor"class="fn">bitor</a>(self, other: &<aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> Self::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/ops/bit/trait.BitOr.html#associatedtype.Output"title="type core::ops::bit::BitOr::Output">Output</a></h4></section></summary><divclass="docblock"><p>Returns the set union, cloned into a new set.</p>
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.bitxor"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#1150-1152">source</a><ahref="#method.bitxor"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/ops/bit/trait.BitXor.html#tymethod.bitxor"class="fn">bitxor</a>(self, other: &<aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> Self::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/ops/bit/trait.BitXor.html#associatedtype.Output"title="type core::ops::bit::BitXor::Output">Output</a></h4></section></summary><divclass="docblock"><p>Returns the set symmetric-difference, cloned into a new set.</p>
S: <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 method-toggle"open><summary><sectionid="method.clone"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#97-101">source</a><ahref="#method.clone"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/clone/trait.Clone.html#tymethod.clone"class="fn">clone</a>(&self) -> Self</h4></section></summary><divclass='docblock'>Returns a copy of the value. <ahref="https://doc.rust-lang.org/1.80.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_from"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#103-105">source</a><ahref="#method.clone_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/clone/trait.Clone.html#method.clone_from"class="fn">clone_from</a>(&mut self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><divclass='docblock'>Performs copy-assignment from <code>source</code>. <ahref="https://doc.rust-lang.org/1.80.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Debug-for-IndexSet%3CT,+S%3E"class="impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#134-148">source</a><ahref="#impl-Debug-for-IndexSet%3CT,+S%3E"class="anchor">§</a><h3class="code-header">impl<T, S><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S><divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#139-141">source</a><ahref="#method.fmt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Debug.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.80.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Default-for-IndexSet%3CT,+S%3E"class="impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#1041-1051">source</a><ahref="#impl-Default-for-IndexSet%3CT,+S%3E"class="anchor">§</a><h3class="code-header">impl<T, S><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/default/trait.Default.html"title="trait core::default::Default">Default</a> for <aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S><divclass="where">where
S: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.extend"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#1035-1038">source</a><ahref="#method.extend"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend"class="fn">extend</a><I: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&'a T</a>>>(&mut self, iterable: I)</h4></section></summary><divclass='docblock'>Extends a collection with the contents of an iterator. <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.extend_one"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/iter/traits/collect.rs.html#453">source</a><ahref="#method.extend_one"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.Extend.html#method.extend_one"class="fn">extend_one</a>(&mut self, item: A)</h4></section></summary><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><divclass='docblock'>Extends a collection with exactly one element.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.extend_reserve"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/iter/traits/collect.rs.html#461">source</a><ahref="#method.extend_reserve"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve"class="fn">extend_reserve</a>(&mut self, additional: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>)</h4></section></summary><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><divclass='docblock'>Reserves capacity in a collection for the given number of additional elements. <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Extend%3CT%3E-for-IndexSet%3CT,+S%3E"class="impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#1019-1028">source</a><ahref="#impl-Extend%3CT%3E-for-IndexSet%3CT,+S%3E"class="anchor">§</a><h3class="code-header">impl<T, S><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.Extend.html"title="trait core::iter::traits::collect::Extend">Extend</a><T> for <aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S><divclass="where">where
S: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.extend-1"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#1024-1027">source</a><ahref="#method.extend-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend"class="fn">extend</a><I: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>>(&mut self, iterable: I)</h4></section></summary><divclass='docblock'>Extends a collection with the contents of an iterator. <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.extend_one-1"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/iter/traits/collect.rs.html#453">source</a><ahref="#method.extend_one-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.Extend.html#method.extend_one"class="fn">extend_one</a>(&mut self, item: A)</h4></section></summary><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><divclass='docblock'>Extends a collection with exactly one element.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.extend_reserve-1"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/iter/traits/collect.rs.html#461">source</a><ahref="#method.extend_reserve-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve"class="fn">extend_reserve</a>(&mut self, additional: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>)</h4></section></summary><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><divclass='docblock'>Reserves capacity in a collection for the given number of additional elements. <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-From%3C%5BT;+N%5D%3E-for-IndexSet%3CT%3E"class="impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#1001-1017">source</a><ahref="#impl-From%3C%5BT;+N%5D%3E-for-IndexSet%3CT%3E"class="anchor">§</a><h3class="code-header">impl<T, const N: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.array.html">[T; N]</a>> for <aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, <aclass="struct"href="https://doc.rust-lang.org/1.80.0/std/hash/random/struct.RandomState.html"title="struct std::hash::random::RandomState">RandomState</a>><divclass="where">where
</div><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.index-5"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#980-983">source</a><ahref="#method.index-5"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/ops/index/trait.Index.html#tymethod.index"class="fn">index</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&T</a></h4></section></summary><divclass="docblock"><p>Returns a reference to the value at the supplied <code>index</code>.</p>
</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.Output-7"class="associatedtype trait-impl"><ahref="#associatedtype.Output-7"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/ops/index/trait.Index.html#associatedtype.Output"class="associatedtype">Output</a> = T</h4></section></summary><divclass='docblock'>The returned type after indexing.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-IntoIterator-for-%26IndexSet%3CT,+S%3E"class="impl"><aclass="src rightside"href="../../src/indexmap/set/iter.rs.html#10-17">source</a><ahref="#impl-IntoIterator-for-%26IndexSet%3CT,+S%3E"class="anchor">§</a><h3class="code-header">impl<'a, T, S><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'a <aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Item"class="associatedtype trait-impl"><ahref="#associatedtype.Item"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item"class="associatedtype">Item</a> = <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&'a T</a></h4></section></summary><divclass='docblock'>The type of the elements being iterated over.</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.IntoIter"class="associatedtype trait-impl"><ahref="#associatedtype.IntoIter"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"class="associatedtype">IntoIter</a> = <aclass="struct"href="struct.Iter.html"title="struct indexmap::set::Iter">Iter</a><'a, T></h4></section></summary><divclass='docblock'>Which kind of iterator are we turning this into?</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_iter"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set/iter.rs.html#14-16">source</a><ahref="#method.into_iter"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter"class="fn">into_iter</a>(self) -> Self::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><divclass='docblock'>Creates an iterator from a value. <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-IntoIterator-for-IndexSet%3CT,+S%3E"class="impl"><aclass="src rightside"href="../../src/indexmap/set/iter.rs.html#19-26">source</a><ahref="#impl-IntoIterator-for-IndexSet%3CT,+S%3E"class="anchor">§</a><h3class="code-header">impl<T, S><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Item-1"class="associatedtype trait-impl"><ahref="#associatedtype.Item-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item"class="as
S: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h3></section></summary><divclass="docblock"><p>Opt-in mutable access to <ahref="struct.IndexSet.html"title="struct indexmap::set::IndexSet"><code>IndexSet</code></a> values.</p>
Q: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> + <aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><T>,</div></h4></section></summary><divclass='docblock'>Return item index and mutable reference to the value <ahref="trait.MutableValues.html#tymethod.get_full_mut2">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_index_mut2"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set/mutable.rs.html#67-72">source</a><ahref="#method.get_index_mut2"class="anchor">§</a><h4class="code-header">fn <ahref="trait.MutableValues.html#tymethod.get_index_mut2"class="fn">get_index_mut2</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</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/std/primitive.reference.html">&mut T</a>></h4></section></summary><divclass='docblock'>Return mutable reference to the value at an index. <ahref="trait.MutableValues.html#tymethod.get_index_mut2">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.retain2"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set/mutable.rs.html#74-79">source</a><ahref="#method.retain2"class="anchor">§</a><h4class="code-header">fn <ahref="trait.MutableValues.html#tymethod.retain2"class="fn">retain2</a><F>(&mut self, keep: F)<divclass="where">where
F: <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/std/primitive.reference.html">&mut T</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass='docblock'>Scan through each value in the set and keep those where the
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#1059-1061">source</a><ahref="#method.eq"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#263">source</a></span><ahref="#method.ne"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Sub%3C%26IndexSet%3CT,+S2%3E%3E-for-%26IndexSet%3CT,+S1%3E"class="impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#1155-1169">source</a><ahref="#impl-Sub%3C%26IndexSet%3CT,+S2%3E%3E-for-%26IndexSet%3CT,+S1%3E"class="anchor">§</a><h3class="code-header">impl<T, S1, S2><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/arith/trait.Sub.html"title="trait core::ops::arith::Sub">Sub</a><&<aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>> for &<aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S1><divclass="where">where
S2: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html"title="trait core::hash::BuildHasher">BuildHasher</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.sub"class="method trait-impl"><aclass="src rightside"href="../../src/indexmap/set.rs.html#1166-1168">source</a><ahref="#method.sub"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/ops/arith/trait.Sub.html#tymethod.sub"class="fn">sub</a>(self, other: &<aclass="struct"href="struct.IndexSet.html"title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> Self::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/ops/arith/trait.Sub.html#associatedtype.Output"title="type core::ops::arith::Sub::Output">Output</a></h4></section></summary><divclass="docblock"><p>Returns the set difference, cloned into a new set.</p>
K: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><Q> + ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.equivalent"class="method trait-impl"><aclass="src rightside"href="../../src/hashbrown/lib.rs.html#171">source</a><ahref="#method.equivalent"class="anchor">§</a><h4class="code-header">fn <ahref="../../hashbrown/trait.Equivalent.html#tymethod.equivalent"class="fn">equivalent</a>(&self, key: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&K</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>Checks if this value is equivalent to the given key. <ahref="../../hashbrown/trait.Equivalent.html#tymethod.equivalent">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Equivalent%3CK%3E-for-Q-1"class="impl"><aclass="src rightside"href="../../src/equivalent/lib.rs.html#82-85">source</a><ahref="#impl-Equivalent%3CK%3E-for-Q-1"class="anchor">§</a><h3class="code-header">impl<Q, K><aclass="trait"href="../trait.Equivalent.html"title="trait indexmap::Equivalent">Equivalent</a><K> for Q<divclass="where">where
<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/std/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">{"Difference<'a,T,S2>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.Difference.html\"title=\"structindexmap::set::Difference\">Difference</a><'a,T,S></code></h3><pre><code><divclass=\"where\">impl<'a,T,S><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.Difference.html\"title=\"structindexmap::set::Difference\">Difference</a><'a,T,S><divclass=\"where\">where\nT:<aclass=\"trait\"href=\"https://doc.rust-lang.org/1.80.0/core/cmp/trait.Eq.html\"title=\"traitcore::cmp::Eq\">Eq</a>+<aclass=\"trait\"href=\"https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html\"title=\"traitcore::hash::Hash\">Hash</a>,\nS:<aclass=\"trait\"href=\"https://doc.rust-lang.org/1.80.0/core/hash/trait.BuildHasher.html\"title=\"traitcore::hash::BuildHasher\">BuildHasher</a>,</div></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>=<aclass=\"primitive\"href=\"https://doc.rust-lang.org/1.80.0/std/primitive.reference.html\">&'aT</a>;</div>","Drain<'_,T>":"<h3>Notabletraitsfor<code><aclass=\"struct\"href=\"struct.Drain.html\"title=\"structindexmap::set::Drain\">Drain</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.Drain.html\"title=\"structindexmap::set::Drain\">Drain</a><'_,T></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>","Intersection<'a,T,S2>":"<h3>Notabletraitsfor<code><aclass=\"struct\