mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-16 22:12:55 +00:00
294 lines
86 KiB
HTML
294 lines
86 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 `BitSet` struct in crate `bit_set`."><meta name="keywords" content="rust, rustlang, rust-lang, BitSet"><title>bit_set::BitSet - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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><a href='../bit_set/index.html'><img src='../rust-logo.png' alt='logo' width='100'></a><p class='location'>Struct BitSet</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.capacity">capacity</a><a href="#method.clear">clear</a><a href="#method.contains">contains</a><a href="#method.difference">difference</a><a href="#method.difference_with">difference_with</a><a href="#method.from_bit_vec">from_bit_vec</a><a href="#method.from_bytes">from_bytes</a><a href="#method.get_ref">get_ref</a><a href="#method.insert">insert</a><a href="#method.intersect_with">intersect_with</a><a href="#method.intersection">intersection</a><a href="#method.into_bit_vec">into_bit_vec</a><a href="#method.is_disjoint">is_disjoint</a><a href="#method.is_empty">is_empty</a><a href="#method.is_subset">is_subset</a><a href="#method.is_superset">is_superset</a><a href="#method.iter">iter</a><a href="#method.len">len</a><a href="#method.new">new</a><a href="#method.remove">remove</a><a href="#method.reserve_len">reserve_len</a><a href="#method.reserve_len_exact">reserve_len_exact</a><a href="#method.shrink_to_fit">shrink_to_fit</a><a href="#method.symmetric_difference">symmetric_difference</a><a href="#method.symmetric_difference_with">symmetric_difference_with</a><a href="#method.union">union</a><a href="#method.union_with">union_with</a><a href="#method.with_capacity">with_capacity</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-Default">Default</a><a href="#impl-Eq">Eq</a><a href="#impl-Extend%3Cusize%3E">Extend<usize></a><a href="#impl-FromIterator%3Cusize%3E">FromIterator<usize></a><a href="#impl-Hash">Hash</a><a href="#impl-IntoIterator">IntoIterator</a><a href="#impl-Ord">Ord</a><a href="#impl-PartialEq%3CBitSet%3CB%3E%3E">PartialEq<BitSet<B>></a><a href="#impl-PartialOrd%3CBitSet%3CB%3E%3E">PartialOrd<BitSet<B>></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow">Borrow</a><a href="#impl-BorrowMut">BorrowMut</a><a href="#impl-From">From</a><a href="#impl-Into">Into</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom">TryFrom</a><a href="#impl-TryInto">TryInto</a></div></div><p class='location'><a href='index.html'>bit_set</a></p><script>window.sidebarCurrent = {name: 'BitSet', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/bit_set/lib.rs.html#105-107' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>bit_set</a>::<wbr><a class="struct" href=''>BitSet</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct BitSet<B = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>> { /* fields omitted */ }</pre></div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#166-227' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>() -> Self</code><a class='srclink' href='../src/bit_set/lib.rs.html#177-179' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new empty <code>BitSet</code>.</p>
|
||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">new</span>();</pre></div>
|
||
</div><h4 id='method.with_capacity' class="method"><code id='with_capacity.v'>pub fn <a href='#method.with_capacity' class='fnname'>with_capacity</a>(nbits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self</code><a class='srclink' href='../src/bit_set/lib.rs.html#193-196' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new <code>BitSet</code> with initially no contents, able to
|
||
hold <code>nbits</code> elements without resizing.</p>
|
||
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">with_capacity</span>(<span class="number">100</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">>=</span> <span class="number">100</span>);</pre></div>
|
||
</div><h4 id='method.from_bit_vec' class="method"><code id='from_bit_vec.v'>pub fn <a href='#method.from_bit_vec' class='fnname'>from_bit_vec</a>(bit_vec: <a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a>) -> Self</code><a class='srclink' href='../src/bit_set/lib.rs.html#220-222' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new <code>BitSet</code> from the given bit vector.</p>
|
||
<h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">bit_vec</span>;
|
||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">bit_set</span>;
|
||
|
||
<span class="kw">fn</span> <span class="ident">main</span>() {
|
||
<span class="kw">use</span> <span class="ident">bit_vec</span>::<span class="ident">BitVec</span>;
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="number">0b01100000</span>]);
|
||
<span class="kw">let</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bit_vec</span>(<span class="ident">bv</span>);
|
||
|
||
<span class="comment">// Print 1, 2 in arbitrary order</span>
|
||
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="ident">s</span>.<span class="ident">iter</span>() {
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}"</span>, <span class="ident">x</span>);
|
||
}
|
||
}</pre></div>
|
||
</div><h4 id='method.from_bytes' class="method"><code id='from_bytes.v'>pub fn <a href='#method.from_bytes' class='fnname'>from_bytes</a>(bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> Self</code><a class='srclink' href='../src/bit_set/lib.rs.html#224-226' title='goto source code'>[src]</a></h4></div><h3 id='impl-1' class='impl'><code class='in-band'>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-1' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#229-793' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.capacity' class="method"><code id='capacity.v'>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><a class='srclink' href='../src/bit_set/lib.rs.html#243-245' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the capacity in bits for this bit vector. Inserting any
|
||
element less than this amount will not trigger a resizing.</p>
|
||
<h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">with_capacity</span>(<span class="number">100</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">>=</span> <span class="number">100</span>);</pre></div>
|
||
</div><h4 id='method.reserve_len' class="method"><code id='reserve_len.v'>pub fn <a href='#method.reserve_len' class='fnname'>reserve_len</a>(&mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code><a class='srclink' href='../src/bit_set/lib.rs.html#263-268' title='goto source code'>[src]</a></h4><div class='docblock'><p>Reserves capacity for the given <code>BitSet</code> to contain <code>len</code> distinct elements. In the case
|
||
of <code>BitSet</code> this means reallocations will not occur as long as all inserted elements
|
||
are less than <code>len</code>.</p>
|
||
<p>The collection may reserve more space to avoid frequent reallocations.</p>
|
||
<h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">new</span>();
|
||
<span class="ident">s</span>.<span class="ident">reserve_len</span>(<span class="number">10</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">>=</span> <span class="number">10</span>);</pre></div>
|
||
</div><h4 id='method.reserve_len_exact' class="method"><code id='reserve_len_exact.v'>pub fn <a href='#method.reserve_len_exact' class='fnname'>reserve_len_exact</a>(&mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code><a class='srclink' href='../src/bit_set/lib.rs.html#288-293' title='goto source code'>[src]</a></h4><div class='docblock'><p>Reserves the minimum capacity for the given <code>BitSet</code> to contain <code>len</code> distinct elements.
|
||
In the case of <code>BitSet</code> this means reallocations will not occur as long as all inserted
|
||
elements are less than <code>len</code>.</p>
|
||
<p>Note that the allocator may give the collection more space than it requests. Therefore
|
||
capacity can not be relied upon to be precisely minimal. Prefer <code>reserve_len</code> if future
|
||
insertions are expected.</p>
|
||
<h1 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">new</span>();
|
||
<span class="ident">s</span>.<span class="ident">reserve_len_exact</span>(<span class="number">10</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">>=</span> <span class="number">10</span>);</pre></div>
|
||
</div><h4 id='method.into_bit_vec' class="method"><code id='into_bit_vec.v'>pub fn <a href='#method.into_bit_vec' class='fnname'>into_bit_vec</a>(self) -> <a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a class='srclink' href='../src/bit_set/lib.rs.html#311-313' title='goto source code'>[src]</a></h4><div class='docblock'><p>Consumes this set to return the underlying bit vector.</p>
|
||
<h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">new</span>();
|
||
<span class="ident">s</span>.<span class="ident">insert</span>(<span class="number">0</span>);
|
||
<span class="ident">s</span>.<span class="ident">insert</span>(<span class="number">3</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">into_bit_vec</span>();
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bv</span>[<span class="number">0</span>]);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bv</span>[<span class="number">3</span>]);</pre></div>
|
||
</div><h4 id='method.get_ref' class="method"><code id='get_ref.v'>pub fn <a href='#method.get_ref' class='fnname'>get_ref</a>(&self) -> &<a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a class='srclink' href='../src/bit_set/lib.rs.html#329-331' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a reference to the underlying bit vector.</p>
|
||
<h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">new</span>();
|
||
<span class="ident">s</span>.<span class="ident">insert</span>(<span class="number">0</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">get_ref</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>[<span class="number">0</span>], <span class="bool-val">true</span>);</pre></div>
|
||
</div><h4 id='method.shrink_to_fit' class="method"><code id='shrink_to_fit.v'>pub fn <a href='#method.shrink_to_fit' class='fnname'>shrink_to_fit</a>(&mut self)</code><a class='srclink' href='../src/bit_set/lib.rs.html#382-394' title='goto source code'>[src]</a></h4><div class='docblock'><p>Truncates the underlying vector to the least length required.</p>
|
||
<h1 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">new</span>();
|
||
<span class="ident">s</span>.<span class="ident">insert</span>(<span class="number">32183231</span>);
|
||
<span class="ident">s</span>.<span class="ident">remove</span>(<span class="number">32183231</span>);
|
||
|
||
<span class="comment">// Internal storage will probably be bigger than necessary</span>
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"old capacity: {}"</span>, <span class="ident">s</span>.<span class="ident">capacity</span>());
|
||
|
||
<span class="comment">// Now should be smaller</span>
|
||
<span class="ident">s</span>.<span class="ident">shrink_to_fit</span>();
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"new capacity: {}"</span>, <span class="ident">s</span>.<span class="ident">capacity</span>());</pre></div>
|
||
</div><h4 id='method.iter' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../bit_set/struct.Iter.html" title="struct bit_set::Iter">Iter</a><'a, B></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bit_set/struct.Iter.html" title="struct bit_set::Iter">Iter</a><'a, B></h3><code class="content"><span class="where fmt-newline">impl<'a, B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../bit_set/struct.Iter.html" title="struct bit_set::Iter">Iter</a><'a, B></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;</span></code></div></div><code id='iter.v'>pub fn <a href='#method.iter' class='fnname'>iter</a>(&self) -> <a class="struct" href="../bit_set/struct.Iter.html" title="struct bit_set::Iter">Iter</a><B></code><a class='srclink' href='../src/bit_set/lib.rs.html#411-413' title='goto source code'>[src]</a></h4><div class='docblock'><p>Iterator over each usize stored in the <code>BitSet</code>.</p>
|
||
<h1 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="number">0b01001010</span>]);
|
||
|
||
<span class="comment">// Print 1, 4, 6 in arbitrary order</span>
|
||
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="ident">s</span>.<span class="ident">iter</span>() {
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}"</span>, <span class="ident">x</span>);
|
||
}</pre></div>
|
||
</div><h4 id='method.union' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../bit_set/struct.Union.html" title="struct bit_set::Union">Union</a><'a, B></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bit_set/struct.Union.html" title="struct bit_set::Union">Union</a><'a, B></h3><code class="content"><span class="where fmt-newline">impl<'a, B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../bit_set/struct.Union.html" title="struct bit_set::Union">Union</a><'a, B></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;</span></code></div></div><code id='union.v'>pub fn <a href='#method.union' class='fnname'>union</a><'a>(&'a self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>Self) -> <a class="struct" href="../bit_set/struct.Union.html" title="struct bit_set::Union">Union</a><'a, B></code><a class='srclink' href='../src/bit_set/lib.rs.html#432-440' title='goto source code'>[src]</a></h4><div class='docblock'><p>Iterator over each usize stored in <code>self</code> union <code>other</code>.
|
||
See <a href="#method.union_with">union_with</a> for an efficient in-place version.</p>
|
||
<h1 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="number">0b01101000</span>]);
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="number">0b10100000</span>]);
|
||
|
||
<span class="comment">// Print 0, 1, 2, 4 in arbitrary order</span>
|
||
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="ident">a</span>.<span class="ident">union</span>(<span class="kw-2">&</span><span class="ident">b</span>) {
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}"</span>, <span class="ident">x</span>);
|
||
}</pre></div>
|
||
</div><h4 id='method.intersection' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../bit_set/struct.Intersection.html" title="struct bit_set::Intersection">Intersection</a><'a, B></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bit_set/struct.Intersection.html" title="struct bit_set::Intersection">Intersection</a><'a, B></h3><code class="content"><span class="where fmt-newline">impl<'a, B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../bit_set/struct.Intersection.html" title="struct bit_set::Intersection">Intersection</a><'a, B></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;</span></code></div></div><code id='intersection.v'>pub fn <a href='#method.intersection' class='fnname'>intersection</a><'a>(&'a self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>Self) -> <a class="struct" href="../bit_set/struct.Intersection.html" title="struct bit_set::Intersection">Intersection</a><'a, B></code><a class='srclink' href='../src/bit_set/lib.rs.html#459-468' title='goto source code'>[src]</a></h4><div class='docblock'><p>Iterator over each usize stored in <code>self</code> intersect <code>other</code>.
|
||
See <a href="#method.intersect_with">intersect_with</a> for an efficient in-place version.</p>
|
||
<h1 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="number">0b01101000</span>]);
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="number">0b10100000</span>]);
|
||
|
||
<span class="comment">// Print 2</span>
|
||
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="ident">a</span>.<span class="ident">intersection</span>(<span class="kw-2">&</span><span class="ident">b</span>) {
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}"</span>, <span class="ident">x</span>);
|
||
}</pre></div>
|
||
</div><h4 id='method.difference' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../bit_set/struct.Difference.html" title="struct bit_set::Difference">Difference</a><'a, B></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bit_set/struct.Difference.html" title="struct bit_set::Difference">Difference</a><'a, B></h3><code class="content"><span class="where fmt-newline">impl<'a, B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../bit_set/struct.Difference.html" title="struct bit_set::Difference">Difference</a><'a, B></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;</span></code></div></div><code id='difference.v'>pub fn <a href='#method.difference' class='fnname'>difference</a><'a>(&'a self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>Self) -> <a class="struct" href="../bit_set/struct.Difference.html" title="struct bit_set::Difference">Difference</a><'a, B></code><a class='srclink' href='../src/bit_set/lib.rs.html#494-502' title='goto source code'>[src]</a></h4><div class='docblock'><p>Iterator over each usize stored in the <code>self</code> setminus <code>other</code>.
|
||
See <a href="#method.difference_with">difference_with</a> for an efficient in-place version.</p>
|
||
<h1 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="number">0b01101000</span>]);
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="number">0b10100000</span>]);
|
||
|
||
<span class="comment">// Print 1, 4 in arbitrary order</span>
|
||
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="ident">a</span>.<span class="ident">difference</span>(<span class="kw-2">&</span><span class="ident">b</span>) {
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}"</span>, <span class="ident">x</span>);
|
||
}
|
||
|
||
<span class="comment">// Note that difference is not symmetric,</span>
|
||
<span class="comment">// and `b - a` means something else.</span>
|
||
<span class="comment">// This prints 0</span>
|
||
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="ident">b</span>.<span class="ident">difference</span>(<span class="kw-2">&</span><span class="ident">a</span>) {
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}"</span>, <span class="ident">x</span>);
|
||
}</pre></div>
|
||
</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="../bit_set/struct.SymmetricDifference.html" title="struct bit_set::SymmetricDifference">SymmetricDifference</a><'a, B></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bit_set/struct.SymmetricDifference.html" title="struct bit_set::SymmetricDifference">SymmetricDifference</a><'a, B></h3><code class="content"><span class="where fmt-newline">impl<'a, B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../bit_set/struct.SymmetricDifference.html" title="struct bit_set::SymmetricDifference">SymmetricDifference</a><'a, B></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;</span></code></div></div><code id='symmetric_difference.v'>pub fn <a href='#method.symmetric_difference' class='fnname'>symmetric_difference</a><'a>(<br> &'a self, <br> other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>Self<br>) -> <a class="struct" href="../bit_set/struct.SymmetricDifference.html" title="struct bit_set::SymmetricDifference">SymmetricDifference</a><'a, B></code><a class='srclink' href='../src/bit_set/lib.rs.html#522-530' title='goto source code'>[src]</a></h4><div class='docblock'><p>Iterator over each usize stored in the symmetric difference of <code>self</code> and <code>other</code>.
|
||
See <a href="#method.symmetric_difference_with">symmetric_difference_with</a> for
|
||
an efficient in-place version.</p>
|
||
<h1 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="number">0b01101000</span>]);
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="number">0b10100000</span>]);
|
||
|
||
<span class="comment">// Print 0, 1, 4 in arbitrary order</span>
|
||
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="ident">a</span>.<span class="ident">symmetric_difference</span>(<span class="kw-2">&</span><span class="ident">b</span>) {
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}"</span>, <span class="ident">x</span>);
|
||
}</pre></div>
|
||
</div><h4 id='method.union_with' class="method"><code id='union_with.v'>pub fn <a href='#method.union_with' class='fnname'>union_with</a>(&mut self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><a class='srclink' href='../src/bit_set/lib.rs.html#551-553' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unions in-place with the specified other bit vector.</p>
|
||
<h1 id="examples-14" class="section-header"><a href="#examples-14">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="number">0b01101000</span>;
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="number">0b10100000</span>;
|
||
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="number">0b11101000</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">a</span>]);
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">b</span>]);
|
||
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">res</span>]);
|
||
|
||
<span class="ident">a</span>.<span class="ident">union_with</span>(<span class="kw-2">&</span><span class="ident">b</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">a</span>, <span class="ident">res</span>);</pre></div>
|
||
</div><h4 id='method.intersect_with' class="method"><code id='intersect_with.v'>pub fn <a href='#method.intersect_with' class='fnname'>intersect_with</a>(&mut self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><a class='srclink' href='../src/bit_set/lib.rs.html#574-576' title='goto source code'>[src]</a></h4><div class='docblock'><p>Intersects in-place with the specified other bit vector.</p>
|
||
<h1 id="examples-15" class="section-header"><a href="#examples-15">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="number">0b01101000</span>;
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="number">0b10100000</span>;
|
||
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="number">0b00100000</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">a</span>]);
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">b</span>]);
|
||
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">res</span>]);
|
||
|
||
<span class="ident">a</span>.<span class="ident">intersect_with</span>(<span class="kw-2">&</span><span class="ident">b</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">a</span>, <span class="ident">res</span>);</pre></div>
|
||
</div><h4 id='method.difference_with' class="method"><code id='difference_with.v'>pub fn <a href='#method.difference_with' class='fnname'>difference_with</a>(&mut self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><a class='srclink' href='../src/bit_set/lib.rs.html#606-608' title='goto source code'>[src]</a></h4><div class='docblock'><p>Makes this bit vector the difference with the specified other bit vector
|
||
in-place.</p>
|
||
<h1 id="examples-16" class="section-header"><a href="#examples-16">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="number">0b01101000</span>;
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="number">0b10100000</span>;
|
||
<span class="kw">let</span> <span class="ident">a_b</span> <span class="op">=</span> <span class="number">0b01001000</span>; <span class="comment">// a - b</span>
|
||
<span class="kw">let</span> <span class="ident">b_a</span> <span class="op">=</span> <span class="number">0b10000000</span>; <span class="comment">// b - a</span>
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bva</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">a</span>]);
|
||
<span class="kw">let</span> <span class="ident">bvb</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">b</span>]);
|
||
<span class="kw">let</span> <span class="ident">bva_b</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">a_b</span>]);
|
||
<span class="kw">let</span> <span class="ident">bvb_a</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">b_a</span>]);
|
||
|
||
<span class="ident">bva</span>.<span class="ident">difference_with</span>(<span class="kw-2">&</span><span class="ident">bvb</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bva</span>, <span class="ident">bva_b</span>);
|
||
|
||
<span class="kw">let</span> <span class="ident">bva</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">a</span>]);
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bvb</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">b</span>]);
|
||
|
||
<span class="ident">bvb</span>.<span class="ident">difference_with</span>(<span class="kw-2">&</span><span class="ident">bva</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bvb</span>, <span class="ident">bvb_a</span>);</pre></div>
|
||
</div><h4 id='method.symmetric_difference_with' class="method"><code id='symmetric_difference_with.v'>pub fn <a href='#method.symmetric_difference_with' class='fnname'>symmetric_difference_with</a>(&mut self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><a class='srclink' href='../src/bit_set/lib.rs.html#630-632' title='goto source code'>[src]</a></h4><div class='docblock'><p>Makes this bit vector the symmetric difference with the specified other
|
||
bit vector in-place.</p>
|
||
<h1 id="examples-17" class="section-header"><a href="#examples-17">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_set</span>::<span class="ident">BitSet</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="number">0b01101000</span>;
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="number">0b10100000</span>;
|
||
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="number">0b11001000</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">a</span>]);
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">b</span>]);
|
||
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">BitSet</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">res</span>]);
|
||
|
||
<span class="ident">a</span>.<span class="ident">symmetric_difference_with</span>(<span class="kw-2">&</span><span class="ident">b</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">a</span>, <span class="ident">res</span>);</pre></div>
|
||
</div><h4 id='method.len' class="method"><code id='len.v'>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><a class='srclink' href='../src/bit_set/lib.rs.html#716-718' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the number of set bits in this set.</p>
|
||
</div><h4 id='method.is_empty' class="method"><code id='is_empty.v'>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><a class='srclink' href='../src/bit_set/lib.rs.html#722-724' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns whether there are no bits set in this set</p>
|
||
</div><h4 id='method.clear' class="method"><code id='clear.v'>pub fn <a href='#method.clear' class='fnname'>clear</a>(&mut self)</code><a class='srclink' href='../src/bit_set/lib.rs.html#728-730' title='goto source code'>[src]</a></h4><div class='docblock'><p>Clears all bits in this set</p>
|
||
</div><h4 id='method.contains' class="method"><code id='contains.v'>pub fn <a href='#method.contains' class='fnname'>contains</a>(&self, value: <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.bool.html">bool</a></code><a class='srclink' href='../src/bit_set/lib.rs.html#734-737' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if this set contains the specified integer.</p>
|
||
</div><h4 id='method.is_disjoint' class="method"><code id='is_disjoint.v'>pub fn <a href='#method.is_disjoint' class='fnname'>is_disjoint</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/bit_set/lib.rs.html#742-744' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the set has no elements in common with <code>other</code>.
|
||
This is equivalent to checking for an empty intersection.</p>
|
||
</div><h4 id='method.is_subset' class="method"><code id='is_subset.v'>pub fn <a href='#method.is_subset' class='fnname'>is_subset</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/bit_set/lib.rs.html#748-757' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the set is a subset of another.</p>
|
||
</div><h4 id='method.is_superset' class="method"><code id='is_superset.v'>pub fn <a href='#method.is_superset' class='fnname'>is_superset</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/bit_set/lib.rs.html#761-763' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the set is a superset of another.</p>
|
||
</div><h4 id='method.insert' class="method"><code id='insert.v'>pub fn <a href='#method.insert' class='fnname'>insert</a>(&mut self, value: <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.bool.html">bool</a></code><a class='srclink' href='../src/bit_set/lib.rs.html#767-780' title='goto source code'>[src]</a></h4><div class='docblock'><p>Adds a value to the set. Returns <code>true</code> if the value was not already
|
||
present in the set.</p>
|
||
</div><h4 id='method.remove' class="method"><code id='remove.v'>pub fn <a href='#method.remove' class='fnname'>remove</a>(&mut self, value: <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.bool.html">bool</a></code><a class='srclink' href='../src/bit_set/lib.rs.html#784-792' title='goto source code'>[src]</a></h4><div class='docblock'><p>Removes a value from the set. Returns <code>true</code> if the value was
|
||
present in the set.</p>
|
||
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Debug' class='impl'><code class='in-band'>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <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="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#795-799' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, fmt: &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><a class='srclink' href='../src/bit_set/lib.rs.html#796-798' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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-PartialEq%3CBitSet%3CB%3E%3E' class='impl'><code class='in-band'>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <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="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B>> for <a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-PartialEq%3CBitSet%3CB%3E%3E' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#157-162' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code id='eq.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/bit_set/lib.rs.html#159-161' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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"><code id='ne.v'><div class="docblock attributes">#[must_use]
|
||
</div>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><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#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-Eq' class='impl'><code class='in-band'>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <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="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-Eq' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#164' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Ord' class='impl'><code class='in-band'>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-Ord' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#150-155' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.cmp' class="method hidden"><code id='cmp.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code><a class='srclink' href='../src/bit_set/lib.rs.html#152-154' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an <code>Ordering</code> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
|
||
</div><h4 id='method.max' class="method"><code id='max.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max' class='fnname'>max</a>(self, other: Self) -> Self</code><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#549-552' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
|
||
</div><h4 id='method.min' class="method"><code id='min.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min' class='fnname'>min</a>(self, other: Self) -> Self</code><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#566-569' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
|
||
</div><h4 id='method.clamp' class="method"><code id='clamp.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp' class='fnname'>clamp</a>(self, min: Self, max: Self) -> Self</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#590-600' title='goto source code'>[src]</a></h4><div class='stability'><div class='stab unstable'><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>clamp</code>)</div></div><div class='docblock'><p>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></p>
|
||
</div></div><h3 id='impl-PartialOrd%3CBitSet%3CB%3E%3E' class='impl'><code class='in-band'>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B>> for <a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-PartialOrd%3CBitSet%3CB%3E%3E' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#143-148' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp' class="method hidden"><code id='partial_cmp.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></code><a class='srclink' href='../src/bit_set/lib.rs.html#145-147' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
|
||
</div><h4 id='method.lt' class="method"><code id='lt.v'><div class="docblock attributes">#[must_use]
|
||
</div>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</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><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#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
|
||
</div><h4 id='method.le' class="method"><code id='le.v'><div class="docblock attributes">#[must_use]
|
||
</div>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</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><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#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
|
||
</div><h4 id='method.gt' class="method"><code id='gt.v'><div class="docblock attributes">#[must_use]
|
||
</div>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</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><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#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
|
||
</div><h4 id='method.ge' class="method"><code id='ge.v'><div class="docblock attributes">#[must_use]
|
||
</div>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</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><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#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
|
||
</div></div><h3 id='impl-Hash' class='impl'><code class='in-band'>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-Hash' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#801-807' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.hash' class="method hidden"><code id='hash.v'>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a><H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>H)</code><a class='srclink' href='../src/bit_set/lib.rs.html#802-806' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Feeds this value into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
|
||
</div><h4 id='method.hash_slice' class="method"><code id='hash_slice.v'>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a><H>(data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>H) <span class="where fmt-newline">where<br> H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>, </span></code><div class='since' title='Stable since Rust version 1.3.0'>1.3.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#193-199' title='goto source code'>[src]</a></h4><div class='docblock'><p>Feeds a slice of this type into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
|
||
</div></div><h3 id='impl-Extend%3Cusize%3E' class='impl'><code class='in-band'>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-Extend%3Cusize%3E' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#134-141' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.extend' class="method hidden"><code id='extend.v'>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend' class='fnname'>extend</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>>(&mut self, iter: I)</code><a class='srclink' href='../src/bit_set/lib.rs.html#136-140' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html#tymethod.extend">Read more</a></p>
|
||
</div></div><h3 id='impl-FromIterator%3Cusize%3E' class='impl'><code class='in-band'>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-FromIterator%3Cusize%3E' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#126-132' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from_iter' class="method hidden"><code id='from_iter.v'>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/collect/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/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>>(iter: I) -> Self</code><a class='srclink' href='../src/bit_set/lib.rs.html#127-131' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
|
||
</div></div><h3 id='impl-IntoIterator' class='impl'><code class='in-band'>impl<'a, B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'a <a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-IntoIterator' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#936-943' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Item' class="type"><code id='Item.t'>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></h4><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||
</div><h4 id='associatedtype.IntoIter' class="type"><code id='IntoIter.t'>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="../bit_set/struct.Iter.html" title="struct bit_set::Iter">Iter</a><'a, B></code></h4><div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
||
</div><h4 id='method.into_iter' class="method hidden"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../bit_set/struct.Iter.html" title="struct bit_set::Iter">Iter</a><'a, B></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bit_set/struct.Iter.html" title="struct bit_set::Iter">Iter</a><'a, B></h3><code class="content"><span class="where fmt-newline">impl<'a, B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../bit_set/struct.Iter.html" title="struct bit_set::Iter">Iter</a><'a, B></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;</span></code></div></div><code id='into_iter.v'>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -> <a class="struct" href="../bit_set/struct.Iter.html" title="struct bit_set::Iter">Iter</a><'a, B></code><a class='srclink' href='../src/bit_set/lib.rs.html#940-942' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
||
</div></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</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="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#109-119' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> Self</code><a class='srclink' href='../src/bit_set/lib.rs.html#110-114' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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 hidden"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><a class='srclink' href='../src/bit_set/lib.rs.html#116-118' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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-Default' class='impl'><code class='in-band'>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <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="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B></code><a href='#impl-Default' class='anchor'></a><a class='srclink' href='../src/bit_set/lib.rs.html#121-124' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.default' class="method hidden"><code id='default.v'>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> Self</code><a class='srclink' href='../src/bit_set/lib.rs.html#123' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl<B> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B> <span class="where fmt-newline">where<br> B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl<B> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../bit_set/struct.BitSet.html" title="struct bit_set::BitSet">BitSet</a><B> <span class="where fmt-newline">where<br> B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-From' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a> for T</code><a href='#impl-From' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#547' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryFrom' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#565-571' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#568-570' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryInto' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553-560' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#557-559' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Into' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#537-542' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#539-541' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Borrow' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||
</div></div><h3 id='impl-BorrowMut' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||
</div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-91' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&self) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#84-86' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||
</div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#88-90' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
|
||
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
||
</div></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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "bit_set";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |