364 lines
No EOL
90 KiB
HTML
364 lines
No EOL
90 KiB
HTML
<!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="API documentation for the Rust `IndexSet` struct in crate `indexmap`.">
|
||
<meta name="keywords" content="rust, rustlang, rust-lang, IndexSet">
|
||
|
||
<title>indexmap::set::IndexSet - Rust</title>
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../normalize.css">
|
||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle">
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../dark.css">
|
||
<link rel="stylesheet" type="text/css" href="../../main.css" id="themeStyle">
|
||
<script src="../../storage.js"></script>
|
||
|
||
|
||
|
||
|
||
</head>
|
||
<body class="rustdoc struct">
|
||
<!--[if lte IE 8]>
|
||
<div class="warning">
|
||
This old browser is unsupported and will most likely display funky
|
||
things.
|
||
</div>
|
||
<![endif]-->
|
||
|
||
|
||
|
||
<nav class="sidebar">
|
||
<div class="sidebar-menu">☰</div>
|
||
|
||
<p class='location'>Struct IndexSet</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.with_capacity">with_capacity</a><a href="#method.with_capacity_and_hasher">with_capacity_and_hasher</a><a href="#method.len">len</a><a href="#method.is_empty">is_empty</a><a href="#method.with_hasher">with_hasher</a><a href="#method.hasher">hasher</a><a href="#method.capacity">capacity</a><a href="#method.clear">clear</a><a href="#method.reserve">reserve</a><a href="#method.insert">insert</a><a href="#method.iter">iter</a><a href="#method.difference">difference</a><a href="#method.symmetric_difference">symmetric_difference</a><a href="#method.intersection">intersection</a><a href="#method.union">union</a><a href="#method.contains">contains</a><a href="#method.get">get</a><a href="#method.get_full">get_full</a><a href="#method.replace">replace</a><a href="#method.remove">remove</a><a href="#method.swap_remove">swap_remove</a><a href="#method.take">take</a><a href="#method.swap_take">swap_take</a><a href="#method.swap_remove_full">swap_remove_full</a><a href="#method.pop">pop</a><a href="#method.retain">retain</a><a href="#method.sort">sort</a><a href="#method.sort_by">sort_by</a><a href="#method.sorted_by">sorted_by</a><a href="#method.drain">drain</a><a href="#method.get_index">get_index</a><a href="#method.swap_remove_index">swap_remove_index</a><a href="#method.is_disjoint">is_disjoint</a><a href="#method.is_subset">is_subset</a><a href="#method.is_superset">is_superset</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-IntoIterator">IntoIterator</a><a href="#impl-FromIterator%3CT%3E">FromIterator<T></a><a href="#impl-Extend%3CT%3E">Extend<T></a><a href="#impl-Extend%3C%26%27a%20T%3E">Extend<&'a T></a><a href="#impl-Default">Default</a><a href="#impl-PartialEq%3CIndexSet%3CT%2C%20S2%3E%3E">PartialEq<IndexSet<T, S2>></a><a href="#impl-Eq">Eq</a><a href="#impl-BitAnd%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E">BitAnd<&'b IndexSet<T, S2>></a><a href="#impl-BitOr%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E">BitOr<&'b IndexSet<T, S2>></a><a href="#impl-BitXor%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E">BitXor<&'b IndexSet<T, S2>></a><a href="#impl-Sub%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E">Sub<&'b IndexSet<T, S2>></a></div></div><p class='location'><a href='../index.html'>indexmap</a>::<wbr><a href='index.html'>set</a></p><script>window.sidebarCurrent = {name: 'IndexSet', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
|
||
</nav>
|
||
|
||
<div class="theme-picker">
|
||
<button id="theme-picker" aria-label="Pick another theme!">
|
||
<img src="../../brush.svg" width="18" alt="Pick another theme!">
|
||
</button>
|
||
<div id="theme-choices"></div>
|
||
</div>
|
||
<script src="../../theme.js"></script>
|
||
<nav class="sub">
|
||
<form class="search-form js-only">
|
||
<div class="search-container">
|
||
<input class="search-input" name="search"
|
||
autocomplete="off"
|
||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||
type="search">
|
||
</div>
|
||
</form>
|
||
</nav>
|
||
|
||
<section id='main' class="content">
|
||
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>indexmap</a>::<wbr><a href='index.html'>set</a>::<wbr><a class="struct" href=''>IndexSet</a></span><span class='out-of-band'><span id='render-detail'>
|
||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||
[<span class='inner'>−</span>]
|
||
</a>
|
||
</span><a class='srclink' href='../../src/indexmap/set.rs.html#59-61' title='goto source code'>[src]</a></span></h1>
|
||
<pre class='rust struct'>pub struct IndexSet<T, S = <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.RandomState.html" title="struct std::collections::hash::map::RandomState">RandomState</a>> { /* fields omitted */ }</pre><div class='docblock'><p>A hash set where the iteration order of the values is independent of their
|
||
hash values.</p>
|
||
<p>The interface is closely compatible with the standard <code>HashSet</code>, but also
|
||
has additional features.</p>
|
||
<h1 id="order" class="section-header"><a href="#order">Order</a></h1>
|
||
<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
|
||
<code>union</code> 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
|
||
<code>.remove()</code> or <code>.swap_remove()</code> methods. Methods such as <code>.sort_by()</code> of
|
||
course result in a new order, depending on the sorting order.</p>
|
||
<h1 id="indices" class="section-header"><a href="#indices">Indices</a></h1>
|
||
<p>The values are indexed in a compact range without holes in the range
|
||
<code>0..self.len()</code>. For example, the method <code>.get_full</code> looks up the index for
|
||
a value, and the method <code>.get_index</code> looks up the value by index.</p>
|
||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">indexmap</span>::<span class="ident">IndexSet</span>;
|
||
|
||
<span class="comment">// Collects which letters appear in a sentence.</span>
|
||
<span class="kw">let</span> <span class="ident">letters</span>: <span class="ident">IndexSet</span><span class="op"><</span>_<span class="op">></span> <span class="op">=</span> <span class="string">"a short treatise on fungi"</span>.<span class="ident">chars</span>().<span class="ident">collect</span>();
|
||
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">letters</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="string">'s'</span>));
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">letters</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="string">'t'</span>));
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">letters</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="string">'u'</span>));
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">letters</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="string">'y'</span>));</pre>
|
||
</div>
|
||
<h2 id='methods' class='small-section-header'>
|
||
Methods<a href='#methods' class='anchor'></a>
|
||
</h2>
|
||
<h3 id='impl' class='impl'><span class='in-band'><code>impl<T> <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#77-90' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>() -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#79-81' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Create a new set. (Does not allocate.)</p>
|
||
</div><h4 id='method.with_capacity' class="method"><span id='with_capacity.v' class='invisible'><code>pub fn <a href='#method.with_capacity' class='fnname'>with_capacity</a>(n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#87-89' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Create a new set with capacity for <code>n</code> elements.
|
||
(Does not allocate if <code>n</code> is zero.)</p>
|
||
<p>Computes in <strong>O(n)</strong> time.</p>
|
||
</div></div><h3 id='impl-1' class='impl'><span class='in-band'><code>impl<T, S> <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S></code><a href='#impl-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#92-135' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.with_capacity_and_hasher' class="method"><span id='with_capacity_and_hasher.v' class='invisible'><code>pub fn <a href='#method.with_capacity_and_hasher' class='fnname'>with_capacity_and_hasher</a>(n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, hash_builder: S) -> Self <span class="where fmt-newline">where<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#97-101' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Create a new set with capacity for <code>n</code> elements.
|
||
(Does not allocate if <code>n</code> is zero.)</p>
|
||
<p>Computes in <strong>O(n)</strong> time.</p>
|
||
</div><h4 id='method.len' class="method"><span id='len.v' class='invisible'><code>pub fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#106-108' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Return the number of elements in the set.</p>
|
||
<p>Computes in <strong>O(1)</strong> time.</p>
|
||
</div><h4 id='method.is_empty' class="method"><span id='is_empty.v' class='invisible'><code>pub fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#113-115' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns true if the set contains no elements.</p>
|
||
<p>Computes in <strong>O(1)</strong> time.</p>
|
||
</div><h4 id='method.with_hasher' class="method"><span id='with_hasher.v' class='invisible'><code>pub fn <a href='#method.with_hasher' class='fnname'>with_hasher</a>(hash_builder: S) -> Self <span class="where fmt-newline">where<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#118-122' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Create a new set with <code>hash_builder</code></p>
|
||
</div><h4 id='method.hasher' class="method"><span id='hasher.v' class='invisible'><code>pub fn <a href='#method.hasher' class='fnname'>hasher</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>S <span class="where fmt-newline">where<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#125-129' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Return a reference to the set's <code>BuildHasher</code>.</p>
|
||
</div><h4 id='method.capacity' class="method"><span id='capacity.v' class='invisible'><code>pub fn <a href='#method.capacity' class='fnname'>capacity</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#132-134' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Computes in <strong>O(1)</strong> time.</p>
|
||
</div></div><h3 id='impl-2' class='impl'><span class='in-band'><code>impl<T, S> <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#137-381' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.clear' class="method"><span id='clear.v' class='invisible'><code>pub fn <a href='#method.clear' class='fnname'>clear</a>(&mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#144-146' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Remove all elements in the set, while preserving its capacity.</p>
|
||
<p>Computes in <strong>O(n)</strong> time.</p>
|
||
</div><h4 id='method.reserve' class="method"><span id='reserve.v' class='invisible'><code>pub fn <a href='#method.reserve' class='fnname'>reserve</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#149-151' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>FIXME Not implemented fully yet</p>
|
||
</div><h4 id='method.insert' class="method"><span id='insert.v' class='invisible'><code>pub fn <a href='#method.insert' class='fnname'>insert</a>(&mut self, value: T) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#161-163' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Insert the value into the set.</p>
|
||
<p>If an equivalent item already exists in the set, it returns
|
||
<code>false</code> leaving the original value in the set and without
|
||
altering its insertion order. Otherwise, it inserts the new
|
||
item and returns <code>true</code>.</p>
|
||
<p>Computes in <strong>O(1)</strong> time (amortized average).</p>
|
||
</div><h4 id='method.iter' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../indexmap/set/struct.Iter.html" title="struct indexmap::set::Iter">Iter</a><'a, T></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../indexmap/set/struct.Iter.html" title="struct indexmap::set::Iter">Iter</a><'a, T></h3><code class="content"><span class="where fmt-newline">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../indexmap/set/struct.Iter.html" title="struct indexmap::set::Iter">Iter</a><'a, T></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T;</span></code></div></div><span id='iter.v' class='invisible'><code>pub fn <a href='#method.iter' class='fnname'>iter</a>(&self) -> <a class="struct" href="../../indexmap/set/struct.Iter.html" title="struct indexmap::set::Iter">Iter</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#166-170' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Return an iterator over the values of the set, in their order</p>
|
||
</div><h4 id='method.difference' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../indexmap/set/struct.Difference.html" title="struct indexmap::set::Difference">Difference</a><'a, T, S></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../indexmap/set/struct.Difference.html" title="struct indexmap::set::Difference">Difference</a><'a, T, S></h3><code class="content"><span class="where fmt-newline">impl<'a, T, S> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../indexmap/set/struct.Difference.html" title="struct indexmap::set::Difference">Difference</a><'a, T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T;</span></code></div></div><span id='difference.v' class='invisible'><code>pub fn <a href='#method.difference' class='fnname'>difference</a><'a, S2>(<br> &'a self, <br> other: &'a <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2><br>) -> <a class="struct" href="../../indexmap/set/struct.Difference.html" title="struct indexmap::set::Difference">Difference</a><'a, T, S2> <span class="where fmt-newline">where<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#175-182' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Return an iterator over the values that are in <code>self</code> but not <code>other</code>.</p>
|
||
<p>Values are produced in the same order that they appear in <code>self</code>.</p>
|
||
</div><h4 id='method.symmetric_difference' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../indexmap/set/struct.SymmetricDifference.html" title="struct indexmap::set::SymmetricDifference">SymmetricDifference</a><'a, T, S1, S2></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../indexmap/set/struct.SymmetricDifference.html" title="struct indexmap::set::SymmetricDifference">SymmetricDifference</a><'a, T, S1, S2></h3><code class="content"><span class="where fmt-newline">impl<'a, T, S1, S2> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../indexmap/set/struct.SymmetricDifference.html" title="struct indexmap::set::SymmetricDifference">SymmetricDifference</a><'a, T, S1, S2> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,<br> S1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>,<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T;</span></code></div></div><span id='symmetric_difference.v' class='invisible'><code>pub fn <a href='#method.symmetric_difference' class='fnname'>symmetric_difference</a><'a, S2>(<br> &'a self, <br> other: &'a <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2><br>) -> <a class="struct" href="../../indexmap/set/struct.SymmetricDifference.html" title="struct indexmap::set::SymmetricDifference">SymmetricDifference</a><'a, T, S, S2> <span class="where fmt-newline">where<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#189-196' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Return an iterator over the values that are in <code>self</code> or <code>other</code>,
|
||
but not in both.</p>
|
||
<p>Values from <code>self</code> are produced in their original order, followed by
|
||
values from <code>other</code> in their original order.</p>
|
||
</div><h4 id='method.intersection' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../indexmap/set/struct.Intersection.html" title="struct indexmap::set::Intersection">Intersection</a><'a, T, S></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../indexmap/set/struct.Intersection.html" title="struct indexmap::set::Intersection">Intersection</a><'a, T, S></h3><code class="content"><span class="where fmt-newline">impl<'a, T, S> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../indexmap/set/struct.Intersection.html" title="struct indexmap::set::Intersection">Intersection</a><'a, T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T;</span></code></div></div><span id='intersection.v' class='invisible'><code>pub fn <a href='#method.intersection' class='fnname'>intersection</a><'a, S2>(<br> &'a self, <br> other: &'a <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2><br>) -> <a class="struct" href="../../indexmap/set/struct.Intersection.html" title="struct indexmap::set::Intersection">Intersection</a><'a, T, S2> <span class="where fmt-newline">where<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#201-208' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Return an iterator over the values that are in both <code>self</code> and <code>other</code>.</p>
|
||
<p>Values are produced in the same order that they appear in <code>self</code>.</p>
|
||
</div><h4 id='method.union' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../indexmap/set/struct.Union.html" title="struct indexmap::set::Union">Union</a><'a, T, S></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../indexmap/set/struct.Union.html" title="struct indexmap::set::Union">Union</a><'a, T, S></h3><code class="content"><span class="where fmt-newline">impl<'a, T, S> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../indexmap/set/struct.Union.html" title="struct indexmap::set::Union">Union</a><'a, T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T;</span></code></div></div><span id='union.v' class='invisible'><code>pub fn <a href='#method.union' class='fnname'>union</a><'a, S2>(&'a self, other: &'a <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> <a class="struct" href="../../indexmap/set/struct.Union.html" title="struct indexmap::set::Union">Union</a><'a, T, S> <span class="where fmt-newline">where<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#214-220' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Return an iterator over all values that are in <code>self</code> or <code>other</code>.</p>
|
||
<p>Values from <code>self</code> are produced in their original order, followed by
|
||
values that are unique to <code>other</code> in their original order.</p>
|
||
</div><h4 id='method.contains' class="method"><span id='contains.v' class='invisible'><code>pub fn <a href='#method.contains' class='fnname'>contains</a><Q: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Q) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="../../indexmap/trait.Equivalent.html" title="trait indexmap::Equivalent">Equivalent</a><T>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#225-229' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Return <code>true</code> if an equivalent to <code>value</code> exists in the set.</p>
|
||
<p>Computes in <strong>O(1)</strong> time (average).</p>
|
||
</div><h4 id='method.get' class="method"><span id='get.v' class='invisible'><code>pub fn <a href='#method.get' class='fnname'>get</a><Q: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Q) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T> <span class="where fmt-newline">where<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="../../indexmap/trait.Equivalent.html" title="trait indexmap::Equivalent">Equivalent</a><T>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#235-239' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Return a reference to the value stored in the set, if it is present,
|
||
else <code>None</code>.</p>
|
||
<p>Computes in <strong>O(1)</strong> time (average).</p>
|
||
</div><h4 id='method.get_full' class="method"><span id='get_full.v' class='invisible'><code>pub fn <a href='#method.get_full' class='fnname'>get_full</a><Q: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Q) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>> <span class="where fmt-newline">where<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="../../indexmap/trait.Equivalent.html" title="trait indexmap::Equivalent">Equivalent</a><T>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#242-246' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Return item index and value</p>
|
||
</div><h4 id='method.replace' class="method"><span id='replace.v' class='invisible'><code>pub fn <a href='#method.replace' class='fnname'>replace</a>(&mut self, value: T) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#252-260' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Adds a value to the set, replacing the existing value, if any, that is
|
||
equal to the given one. Returns the replaced value.</p>
|
||
<p>Computes in <strong>O(1)</strong> time (average).</p>
|
||
</div><h4 id='method.remove' class="method"><span id='remove.v' class='invisible'><code>pub fn <a href='#method.remove' class='fnname'>remove</a><Q: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Q) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="../../indexmap/trait.Equivalent.html" title="trait indexmap::Equivalent">Equivalent</a><T>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#265-269' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>FIXME Same as .swap_remove</p>
|
||
<p>Computes in <strong>O(1)</strong> time (average).</p>
|
||
</div><h4 id='method.swap_remove' class="method"><span id='swap_remove.v' class='invisible'><code>pub fn <a href='#method.swap_remove' class='fnname'>swap_remove</a><Q: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Q) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="../../indexmap/trait.Equivalent.html" title="trait indexmap::Equivalent">Equivalent</a><T>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#280-284' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Remove the value from the set, and return <code>true</code> if it was present.</p>
|
||
<p>Like <code>Vec::swap_remove</code>, the value is removed by swapping it with the
|
||
last element of the set and popping it off. <strong>This perturbs
|
||
the postion of what used to be the last element!</strong></p>
|
||
<p>Return <code>false</code> if <code>value</code> was not in the set.</p>
|
||
<p>Computes in <strong>O(1)</strong> time (average).</p>
|
||
</div><h4 id='method.take' class="method"><span id='take.v' class='invisible'><code>pub fn <a href='#method.take' class='fnname'>take</a><Q: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Q) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T> <span class="where fmt-newline">where<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="../../indexmap/trait.Equivalent.html" title="trait indexmap::Equivalent">Equivalent</a><T>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#289-293' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>FIXME Same as .swap_take</p>
|
||
<p>Computes in <strong>O(1)</strong> time (average).</p>
|
||
</div><h4 id='method.swap_take' class="method"><span id='swap_take.v' class='invisible'><code>pub fn <a href='#method.swap_take' class='fnname'>swap_take</a><Q: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Q) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T> <span class="where fmt-newline">where<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="../../indexmap/trait.Equivalent.html" title="trait indexmap::Equivalent">Equivalent</a><T>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#305-309' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Removes and returns the value in the set, if any, that is equal to the
|
||
given one.</p>
|
||
<p>Like <code>Vec::swap_remove</code>, the value is removed by swapping it with the
|
||
last element of the set and popping it off. <strong>This perturbs
|
||
the postion of what used to be the last element!</strong></p>
|
||
<p>Return <code>None</code> if <code>value</code> was not in the set.</p>
|
||
<p>Computes in <strong>O(1)</strong> time (average).</p>
|
||
</div><h4 id='method.swap_remove_full' class="method"><span id='swap_remove_full.v' class='invisible'><code>pub fn <a href='#method.swap_remove_full' class='fnname'>swap_remove_full</a><Q: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Q) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>> <span class="where fmt-newline">where<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="../../indexmap/trait.Equivalent.html" title="trait indexmap::Equivalent">Equivalent</a><T>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#318-322' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Remove the value from the set return it and the index it had.</p>
|
||
<p>Like <code>Vec::swap_remove</code>, the value is removed by swapping it with the
|
||
last element of the set and popping it off. <strong>This perturbs
|
||
the postion of what used to be the last element!</strong></p>
|
||
<p>Return <code>None</code> if <code>value</code> was not in the set.</p>
|
||
</div><h4 id='method.pop' class="method"><span id='pop.v' class='invisible'><code>pub fn <a href='#method.pop' class='fnname'>pop</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#327-329' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Remove the last value</p>
|
||
<p>Computes in <strong>O(1)</strong> time (average).</p>
|
||
</div><h4 id='method.retain' class="method"><span id='retain.v' class='invisible'><code>pub fn <a href='#method.retain' class='fnname'>retain</a><F>(&mut self, keep: F) <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#338-342' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Scan through each value in the set and keep those where the
|
||
closure <code>keep</code> returns <code>true</code>.</p>
|
||
<p>The elements are visited in order, and remaining elements keep their
|
||
order.</p>
|
||
<p>Computes in <strong>O(n)</strong> time (average).</p>
|
||
</div><h4 id='method.sort' class="method"><span id='sort.v' class='invisible'><code>pub fn <a href='#method.sort' class='fnname'>sort</a>(&mut self) <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#347-351' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Sort the set’s values by their default ordering.</p>
|
||
<p>See <code>sort_by</code> for details.</p>
|
||
</div><h4 id='method.sort_by' class="method"><span id='sort_by.v' class='invisible'><code>pub fn <a href='#method.sort_by' class='fnname'>sort_by</a><F>(&mut self, compare: F) <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#356-360' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Sort the set’s values in place using the comparison function <code>compare</code>.</p>
|
||
<p>Computes in <strong>O(n log n)</strong> time and <strong>O(n)</strong> space. The sort is stable.</p>
|
||
</div><h4 id='method.sorted_by' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../indexmap/set/struct.IntoIter.html" title="struct indexmap::set::IntoIter">IntoIter</a><T></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../indexmap/set/struct.IntoIter.html" title="struct indexmap::set::IntoIter">IntoIter</a><T></h3><code class="content"><span class="where fmt-newline">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../indexmap/set/struct.IntoIter.html" title="struct indexmap::set::IntoIter">IntoIter</a><T></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = T;</span></code></div></div><span id='sorted_by.v' class='invisible'><code>pub fn <a href='#method.sorted_by' class='fnname'>sorted_by</a><F>(self, cmp: F) -> <a class="struct" href="../../indexmap/set/struct.IntoIter.html" title="struct indexmap::set::IntoIter">IntoIter</a><T> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#366-372' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Sort the values of the set and return a by value iterator of
|
||
the values with the result.</p>
|
||
<p>The sort is stable.</p>
|
||
</div><h4 id='method.drain' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../indexmap/set/struct.Drain.html" title="struct indexmap::set::Drain">Drain</a><'a, T></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../indexmap/set/struct.Drain.html" title="struct indexmap::set::Drain">Drain</a><'a, T></h3><code class="content"><span class="where fmt-newline">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../indexmap/set/struct.Drain.html" title="struct indexmap::set::Drain">Drain</a><'a, T></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = T;</span></code></div></div><span id='drain.v' class='invisible'><code>pub fn <a href='#method.drain' class='fnname'>drain</a>(&mut self, range: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.RangeFull.html" title="struct core::ops::range::RangeFull">RangeFull</a>) -> <a class="struct" href="../../indexmap/set/struct.Drain.html" title="struct indexmap::set::Drain">Drain</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#376-380' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Clears the <code>IndexSet</code>, returning all values as a drain iterator.
|
||
Keeps the allocated memory for reuse.</p>
|
||
</div></div><h3 id='impl-3' class='impl'><span class='in-band'><code>impl<T, S> <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S></code><a href='#impl-3' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#383-401' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.get_index' class="method"><span id='get_index.v' class='invisible'><code>pub fn <a href='#method.get_index' class='fnname'>get_index</a>(&self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#389-391' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Get a value by index</p>
|
||
<p>Valid indices are <em>0 <= index < self.len()</em></p>
|
||
<p>Computes in <strong>O(1)</strong> time.</p>
|
||
</div><h4 id='method.swap_remove_index' class="method"><span id='swap_remove_index.v' class='invisible'><code>pub fn <a href='#method.swap_remove_index' class='fnname'>swap_remove_index</a>(&mut self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#398-400' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Remove the key-value pair by index</p>
|
||
<p>Valid indices are <em>0 <= index < self.len()</em></p>
|
||
<p>Computes in <strong>O(1)</strong> time (average).</p>
|
||
</div></div><h3 id='impl-4' class='impl'><span class='in-band'><code>impl<T, S> <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-4' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#545-573' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.is_disjoint' class="method"><span id='is_disjoint.v' class='invisible'><code>pub fn <a href='#method.is_disjoint' class='fnname'>is_disjoint</a><S2>(&self, other: &<a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#550-558' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns <code>true</code> if <code>self</code> has no elements in common with <code>other</code>.</p>
|
||
</div><h4 id='method.is_subset' class="method"><span id='is_subset.v' class='invisible'><code>pub fn <a href='#method.is_subset' class='fnname'>is_subset</a><S2>(&self, other: &<a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#561-565' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns <code>true</code> if all elements of <code>self</code> are contained in <code>other</code>.</p>
|
||
</div><h4 id='method.is_superset' class="method"><span id='is_superset.v' class='invisible'><code>pub fn <a href='#method.is_superset' class='fnname'>is_superset</a><S2>(&self, other: &<a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#568-572' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns <code>true</code> if all elements of <code>other</code> are contained in <code>self</code>.</p>
|
||
</div></div>
|
||
<h2 id='implementations' class='small-section-header'>
|
||
Trait Implementations<a href='#implementations' class='anchor'></a>
|
||
</h2>
|
||
<h3 id='impl-Clone' class='impl'><span class='in-band'><code>impl<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S></code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#58' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#58' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#112-114' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl<T, S> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#63-75' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#67-74' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||
</div></div><h3 id='impl-IntoIterator' class='impl'><span class='in-band'><code>impl<'a, T, S> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a> for &'a <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-IntoIterator' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#463-473' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='associatedtype.Item' class="type"><span id='Item.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T</code></span></h4>
|
||
<div class='docblock'><p>The type of the elements being iterated over.</p>
|
||
</div><h4 id='associatedtype.IntoIter' class="type"><span id='IntoIter.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="../../indexmap/set/struct.Iter.html" title="struct indexmap::set::Iter">Iter</a><'a, T></code></span></h4>
|
||
<div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
||
</div><h4 id='method.into_iter' class="method"><span id='into_iter.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::IntoIterator::IntoIter">IntoIter</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#470-472' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
||
</div></div><h3 id='impl-IntoIterator-1' class='impl'><span class='in-band'><code>impl<T, S> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a> for <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-IntoIterator-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#475-487' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='associatedtype.Item-1' class="type"><span id='Item.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = T</code></span></h4>
|
||
<div class='docblock'><p>The type of the elements being iterated over.</p>
|
||
</div><h4 id='associatedtype.IntoIter-1' class="type"><span id='IntoIter.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="../../indexmap/set/struct.IntoIter.html" title="struct indexmap::set::IntoIter">IntoIter</a><T></code></span></h4>
|
||
<div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
||
</div><h4 id='method.into_iter-1' class="method"><span id='into_iter.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::IntoIterator::IntoIter">IntoIter</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#482-486' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
||
</div></div><h3 id='impl-FromIterator%3CT%3E' class='impl'><span class='in-band'><code>impl<T, S> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html" title="trait core::iter::traits::FromIterator">FromIterator</a><T> for <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </span></code><a href='#impl-FromIterator%3CT%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#489-497' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.from_iter' class="method"><span id='from_iter.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter' class='fnname'>from_iter</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = T>>(iterable: I) -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#493-496' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
|
||
</div></div><h3 id='impl-Extend%3CT%3E' class='impl'><span class='in-band'><code>impl<T, S> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a><T> for <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-Extend%3CT%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#499-507' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.extend' class="method"><span id='extend.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend' class='fnname'>extend</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = T>>(&mut self, iterable: I)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#503-506' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend">Read more</a></p>
|
||
</div></div><h3 id='impl-Extend%3C%26%27a%20T%3E' class='impl'><span class='in-band'><code>impl<'a, T, S> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T> for <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-Extend%3C%26%27a%20T%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#509-517' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.extend-1' class="method"><span id='extend.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend' class='fnname'>extend</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T>>(&mut self, iterable: I)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#513-516' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend">Read more</a></p>
|
||
</div></div><h3 id='impl-Default' class='impl'><span class='in-band'><code>impl<T, S> <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S> <span class="where fmt-newline">where<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </span></code><a href='#impl-Default' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#520-527' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#524-526' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Return an empty <code>IndexSet</code></p>
|
||
</div></div><h3 id='impl-PartialEq%3CIndexSet%3CT%2C%20S2%3E%3E' class='impl'><span class='in-band'><code>impl<T, S1, S2> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>> for <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S1> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>,<br> S1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>,<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-PartialEq%3CIndexSet%3CT%2C%20S2%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#529-537' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#534-536' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||
</div><h4 id='method.ne' class="method"><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-Eq' class='impl'><span class='in-band'><code>impl<T, S> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-Eq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#539-543' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'></div><h3 id='impl-BitAnd%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E' class='impl'><span class='in-band'><code>impl<'a, 'b, T, S1, S2> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAnd.html" title="trait core::ops::bit::BitAnd">BitAnd</a><&'b <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>> for &'a <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S1> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br> S1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-BitAnd%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#728-741' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='associatedtype.Output' class="type"><span id='Output.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAnd.html#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S1></code></span></h4>
|
||
<div class='docblock'><p>The resulting type after applying the <code>&</code> operator.</p>
|
||
</div><h4 id='method.bitand' class="method"><span id='bitand.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAnd.html#tymethod.bitand' class='fnname'>bitand</a>(self, other: &'b <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAnd.html#associatedtype.Output" title="type core::ops::bit::BitAnd::Output">Output</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#738-740' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns the set intersection, cloned into a new set.</p>
|
||
<p>Values are collected in the same order that they appear in <code>self</code>.</p>
|
||
</div></div><h3 id='impl-BitOr%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E' class='impl'><span class='in-band'><code>impl<'a, 'b, T, S1, S2> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOr.html" title="trait core::ops::bit::BitOr">BitOr</a><&'b <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>> for &'a <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S1> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br> S1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-BitOr%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#743-757' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='associatedtype.Output-1' class="type"><span id='Output.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOr.html#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S1></code></span></h4>
|
||
<div class='docblock'><p>The resulting type after applying the <code>|</code> operator.</p>
|
||
</div><h4 id='method.bitor' class="method"><span id='bitor.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOr.html#tymethod.bitor' class='fnname'>bitor</a>(self, other: &'b <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOr.html#associatedtype.Output" title="type core::ops::bit::BitOr::Output">Output</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#754-756' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns the set union, cloned into a new set.</p>
|
||
<p>Values from <code>self</code> are collected in their original order, followed by
|
||
values that are unique to <code>other</code> in their original order.</p>
|
||
</div></div><h3 id='impl-BitXor%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E' class='impl'><span class='in-band'><code>impl<'a, 'b, T, S1, S2> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXor.html" title="trait core::ops::bit::BitXor">BitXor</a><&'b <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>> for &'a <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S1> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br> S1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-BitXor%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#759-773' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='associatedtype.Output-2' class="type"><span id='Output.t-2' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXor.html#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S1></code></span></h4>
|
||
<div class='docblock'><p>The resulting type after applying the <code>^</code> operator.</p>
|
||
</div><h4 id='method.bitxor' class="method"><span id='bitxor.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXor.html#tymethod.bitxor' class='fnname'>bitxor</a>(self, other: &'b <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXor.html#associatedtype.Output" title="type core::ops::bit::BitXor::Output">Output</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#770-772' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns the set symmetric-difference, cloned into a new set.</p>
|
||
<p>Values from <code>self</code> are collected in their original order, followed by
|
||
values from <code>other</code> in their original order.</p>
|
||
</div></div><h3 id='impl-Sub%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E' class='impl'><span class='in-band'><code>impl<'a, 'b, T, S1, S2> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><&'b <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>> for &'a <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S1> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br> S1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,<br> S2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.BuildHasher.html" title="trait core::hash::BuildHasher">BuildHasher</a>, </span></code><a href='#impl-Sub%3C%26%27b%20IndexSet%3CT%2C%20S2%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#775-788' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='associatedtype.Output-3' class="type"><span id='Output.t-3' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S1></code></span></h4>
|
||
<div class='docblock'><p>The resulting type after applying the <code>-</code> operator.</p>
|
||
</div><h4 id='method.sub' class="method"><span id='sub.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub' class='fnname'>sub</a>(self, other: &'b <a class="struct" href="../../indexmap/set/struct.IndexSet.html" title="struct indexmap::set::IndexSet">IndexSet</a><T, S2>) -> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#associatedtype.Output" title="type core::ops::arith::Sub::Output">Output</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/indexmap/set.rs.html#785-787' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns the set difference, cloned into a new set.</p>
|
||
<p>Values are collected in the same order that they appear in <code>self</code>.</p>
|
||
</div></div></section>
|
||
<section id='search' class="content hidden"></section>
|
||
|
||
<section class="footer"></section>
|
||
|
||
<aside id="help" class="hidden">
|
||
<div>
|
||
<h1 class="hidden">Help</h1>
|
||
|
||
<div class="shortcuts">
|
||
<h2>Keyboard Shortcuts</h2>
|
||
|
||
<dl>
|
||
<dt><kbd>?</kbd></dt>
|
||
<dd>Show this help dialog</dd>
|
||
<dt><kbd>S</kbd></dt>
|
||
<dd>Focus the search field</dd>
|
||
<dt><kbd>↑</kbd></dt>
|
||
<dd>Move up in search results</dd>
|
||
<dt><kbd>↓</kbd></dt>
|
||
<dd>Move down in search results</dd>
|
||
<dt><kbd>↹</kbd></dt>
|
||
<dd>Switch tab</dd>
|
||
<dt><kbd>⏎</kbd></dt>
|
||
<dd>Go to active search result</dd>
|
||
<dt><kbd>+</kbd></dt>
|
||
<dd>Expand all sections</dd>
|
||
<dt><kbd>-</kbd></dt>
|
||
<dd>Collapse all sections</dd>
|
||
</dl>
|
||
</div>
|
||
|
||
<div class="infos">
|
||
<h2>Search Tricks</h2>
|
||
|
||
<p>
|
||
Prefix searches with a type followed by a colon (e.g.
|
||
<code>fn:</code>) to restrict the search to a given type.
|
||
</p>
|
||
|
||
<p>
|
||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||
<code>struct</code>, <code>enum</code>,
|
||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||
and <code>const</code>.
|
||
</p>
|
||
|
||
<p>
|
||
Search functions by type signature (e.g.
|
||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</aside>
|
||
|
||
|
||
|
||
<script>
|
||
window.rootPath = "../../";
|
||
window.currentCrate = "indexmap";
|
||
</script>
|
||
<script src="../../main.js"></script>
|
||
<script defer src="../../search-index.js"></script>
|
||
</body>
|
||
</html> |