stable_bst 0.2.0

An ordered map and set based on a binary search tree. Works with stable Rust 1.9.0.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
<!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="../rustdoc.css">
    <link rel="stylesheet" type="text/css" href="../main.css">
    

    
    
</head>
<body class="rustdoc">
    <!--[if lte IE 8]>
    <div class="warning">
        This old browser is unsupported and will most likely display funky
        things.
    </div>
    <![endif]-->

    

    <nav class="sidebar">
        
        <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>
    </nav>

    <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 struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>bit_set</a>::<wbr><a class='struct' href=''>BitSet</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'>&#x2212;</span>]
                   </a>
               </span><a id='src-26' class='srclink' href='../src/bit_set/lib.rs.html#99-101' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct BitSet&lt;B = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; {
    // some fields omitted
}</pre><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt;</code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>() -&gt; Self</code></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>
<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><h4 id='method.with_capacity' class='method'><code>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>) -&gt; Self</code></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>
<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'>&gt;=</span> <span class='number'>100</span>);</pre>
</div><h4 id='method.from_bit_vec' class='method'><code>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='bit_vec::BitVec'>BitVec</a>) -&gt; Self</code></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>
<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'>&amp;</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'>&quot;{}&quot;</span>, <span class='ident'>x</span>);
    }
}</pre>
</div><h4 id='method.from_bytes' class='method'><code>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'>&amp;[</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>) -&gt; Self</code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.capacity' class='method'><code>fn <a href='#method.capacity' class='fnname'>capacity</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></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>
<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'>&gt;=</span> <span class='number'>100</span>);</pre>
</div><h4 id='method.reserve_len' class='method'><code>fn <a href='#method.reserve_len' class='fnname'>reserve_len</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></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>
<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'>&gt;=</span> <span class='number'>10</span>);</pre>
</div><h4 id='method.reserve_len_exact' class='method'><code>fn <a href='#method.reserve_len_exact' class='fnname'>reserve_len_exact</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></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>
<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'>&gt;=</span> <span class='number'>10</span>);</pre>
</div><h4 id='method.into_bit_vec' class='method'><code>fn <a href='#method.into_bit_vec' class='fnname'>into_bit_vec</a>(self) -&gt; <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></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>
<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><h4 id='method.get_ref' class='method'><code>fn <a href='#method.get_ref' class='fnname'>get_ref</a>(&amp;self) -&gt; &amp;<a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></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>
<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='boolval'>true</span>);</pre>
</div><h4 id='method.shrink_to_fit' class='method'><code>fn <a href='#method.shrink_to_fit' class='fnname'>shrink_to_fit</a>(&amp;mut self)</code></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>
<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='kw-2'>&amp;</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'>&quot;old capacity: {}&quot;</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'>&quot;new capacity: {}&quot;</span>, <span class='ident'>s</span>.<span class='ident'>capacity</span>());</pre>
</div><h4 id='method.iter' class='method'><code>fn <a href='#method.iter' class='fnname'>iter</a>(&amp;self) -&gt; <a class='struct' href='../bit_set/struct.Iter.html' title='bit_set::Iter'>Iter</a>&lt;B&gt;</code></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>
<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'>&amp;</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'>&quot;{}&quot;</span>, <span class='ident'>x</span>);
}</pre>
</div><h4 id='method.union' class='method'><code>fn <a href='#method.union' class='fnname'>union</a>&lt;'a&gt;(&amp;'a self, other: &amp;'a Self) -&gt; <a class='struct' href='../bit_set/struct.Union.html' title='bit_set::Union'>Union</a>&lt;'a, B&gt;</code></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>
<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'>&amp;</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'>&amp;</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'>&amp;</span><span class='ident'>b</span>) {
    <span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{}&quot;</span>, <span class='ident'>x</span>);
}</pre>
</div><h4 id='method.intersection' class='method'><code>fn <a href='#method.intersection' class='fnname'>intersection</a>&lt;'a&gt;(&amp;'a self, other: &amp;'a Self) -&gt; <a class='struct' href='../bit_set/struct.Intersection.html' title='bit_set::Intersection'>Intersection</a>&lt;'a, B&gt;</code></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>
<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'>&amp;</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'>&amp;</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'>&amp;</span><span class='ident'>b</span>) {
    <span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{}&quot;</span>, <span class='ident'>x</span>);
}</pre>
</div><h4 id='method.difference' class='method'><code>fn <a href='#method.difference' class='fnname'>difference</a>&lt;'a&gt;(&amp;'a self, other: &amp;'a Self) -&gt; <a class='struct' href='../bit_set/struct.Difference.html' title='bit_set::Difference'>Difference</a>&lt;'a, B&gt;</code></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>
<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'>&amp;</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'>&amp;</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'>&amp;</span><span class='ident'>b</span>) {
    <span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{}&quot;</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'>&amp;</span><span class='ident'>a</span>) {
    <span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{}&quot;</span>, <span class='ident'>x</span>);
}</pre>
</div><h4 id='method.symmetric_difference' class='method'><code>fn <a href='#method.symmetric_difference' class='fnname'>symmetric_difference</a>&lt;'a&gt;(&amp;'a self, other: &amp;'a Self) -&gt; <a class='struct' href='../bit_set/struct.SymmetricDifference.html' title='bit_set::SymmetricDifference'>SymmetricDifference</a>&lt;'a, B&gt;</code></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>
<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'>&amp;</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'>&amp;</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'>&amp;</span><span class='ident'>b</span>) {
    <span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{}&quot;</span>, <span class='ident'>x</span>);
}</pre>
</div><h4 id='method.union_with' class='method'><code>fn <a href='#method.union_with' class='fnname'>union_with</a>(&amp;mut self, other: &amp;Self)</code></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>
<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'>&amp;</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'>&amp;</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'>&amp;</span>[<span class='ident'>res</span>]);

<span class='ident'>a</span>.<span class='ident'>union_with</span>(<span class='kw-2'>&amp;</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><h4 id='method.intersect_with' class='method'><code>fn <a href='#method.intersect_with' class='fnname'>intersect_with</a>(&amp;mut self, other: &amp;Self)</code></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>
<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'>&amp;</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'>&amp;</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'>&amp;</span>[<span class='ident'>res</span>]);

<span class='ident'>a</span>.<span class='ident'>intersect_with</span>(<span class='kw-2'>&amp;</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><h4 id='method.difference_with' class='method'><code>fn <a href='#method.difference_with' class='fnname'>difference_with</a>(&amp;mut self, other: &amp;Self)</code></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>
<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'>&amp;</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'>&amp;</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'>&amp;</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'>&amp;</span>[<span class='ident'>b_a</span>]);

<span class='ident'>bva</span>.<span class='ident'>difference_with</span>(<span class='kw-2'>&amp;</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'>&amp;</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'>&amp;</span>[<span class='ident'>b</span>]);

<span class='ident'>bvb</span>.<span class='ident'>difference_with</span>(<span class='kw-2'>&amp;</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><h4 id='method.symmetric_difference_with' class='method'><code>fn <a href='#method.symmetric_difference_with' class='fnname'>symmetric_difference_with</a>(&amp;mut self, other: &amp;Self)</code></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>
<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'>&amp;</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'>&amp;</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'>&amp;</span>[<span class='ident'>res</span>]);

<span class='ident'>a</span>.<span class='ident'>symmetric_difference_with</span>(<span class='kw-2'>&amp;</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><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<div class='docblock'><p>Returns the number of set bits in this set.</p>
</div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns whether there are no bits set in this set</p>
</div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code></h4>
<div class='docblock'><p>Clears all bits in this set</p>
</div><h4 id='method.contains' class='method'><code>fn <a href='#method.contains' class='fnname'>contains</a>(&amp;self, value: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></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>fn <a href='#method.is_disjoint' class='fnname'>is_disjoint</a>(&amp;self, other: &amp;Self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></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>fn <a href='#method.is_subset' class='fnname'>is_subset</a>(&amp;self, other: &amp;Self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></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>fn <a href='#method.is_superset' class='fnname'>is_superset</a>(&amp;self, other: &amp;Self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></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>fn <a href='#method.insert' class='fnname'>insert</a>(&amp;mut self, value: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></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>fn <a href='#method.remove' class='fnname'>remove</a>(&amp;mut self, value: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></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'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; Self</code></h4>
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> for <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.default' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -&gt; Self</code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; for <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.from_iter' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html#tymethod.from_iter' class='fnname'>from_iter</a>&lt;I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt;&gt;(iter: I) -&gt; Self</code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; for <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.extend' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html#tymethod.extend' class='fnname'>extend</a>&lt;I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt;&gt;(&amp;mut self, iter: I)</code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a> for <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.partial_cmp' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;Self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>&gt;</code></h4>
<h4 id='method.lt' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.le' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.gt' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ge' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> for <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.cmp' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&amp;self, other: &amp;Self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a></code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;Self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> for <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'></div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, fmt: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> for <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.hash' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a>&lt;H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a>&gt;(&amp;self, state: &amp;mut H)</code></h4>
<h4 id='method.hash_slice' class='method'><span class="since">1.3.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a>&lt;H&gt;(data: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[Self]</a>, state: &amp;mut H) <span class='where'>where H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a></span></code></h4>
</div><h3 class='impl'><code>impl&lt;'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a> for &amp;'a <a class='struct' href='../bit_set/struct.BitSet.html' title='bit_set::BitSet'>BitSet</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/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>
<h4 id='associatedtype.IntoIter' class='type'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html#associatedtype.IntoIter' class='type'>IntoIter</a> = <a class='struct' href='../bit_set/struct.Iter.html' title='bit_set::Iter'>Iter</a>&lt;'a, B&gt;</code></h4>
<h4 id='method.into_iter' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -&gt; <a class='struct' href='../bit_set/struct.Iter.html' title='bit_set::Iter'>Iter</a>&lt;'a, B&gt;</code></h4>
</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>?</dt>
                    <dd>Show this help dialog</dd>
                    <dt>S</dt>
                    <dd>Focus the search field</dd>
                    <dt>&larrb;</dt>
                    <dd>Move up in search results</dd>
                    <dt>&rarrb;</dt>
                    <dd>Move down in search results</dd>
                    <dt>&#9166;</dt>
                    <dd>Go to active search result</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 = "bit_set";
        window.playgroundUrl = "";
    </script>
    <script src="../jquery.js"></script>
    <script src="../main.js"></script>
    
    <script defer src="../search-index.js"></script>
</body>
</html>