mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-11 19:42:55 +00:00
559 lines
90 KiB
HTML
559 lines
90 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="generator" content="rustdoc">
|
||
<meta name="description" content="API documentation for the Rust `BitVec` struct in crate `bit_vec`.">
|
||
<meta name="keywords" content="rust, rustlang, rust-lang, BitVec">
|
||
|
||
<title>bit_vec::BitVec - Rust</title>
|
||
|
||
<link rel="stylesheet" type="text/css" href="../normalize.css">
|
||
<link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle">
|
||
|
||
<link rel="stylesheet" type="text/css" href="../dark.css">
|
||
<link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
|
||
<script src="../storage.js"></script>
|
||
|
||
|
||
|
||
|
||
</head>
|
||
<body class="rustdoc struct">
|
||
<!--[if lte IE 8]>
|
||
<div class="warning">
|
||
This old browser is unsupported and will most likely display funky
|
||
things.
|
||
</div>
|
||
<![endif]-->
|
||
|
||
|
||
|
||
<nav class="sidebar">
|
||
<div class="sidebar-menu">☰</div>
|
||
|
||
<p class='location'>Struct BitVec</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.from_elem">from_elem</a><a href="#method.with_capacity">with_capacity</a><a href="#method.from_bytes">from_bytes</a><a href="#method.from_fn">from_fn</a><a href="#method.blocks">blocks</a><a href="#method.storage">storage</a><a href="#method.storage_mut">storage_mut</a><a href="#method.get">get</a><a href="#method.set">set</a><a href="#method.set_all">set_all</a><a href="#method.negate">negate</a><a href="#method.union">union</a><a href="#method.intersect">intersect</a><a href="#method.difference">difference</a><a href="#method.all">all</a><a href="#method.iter">iter</a><a href="#method.none">none</a><a href="#method.any">any</a><a href="#method.to_bytes">to_bytes</a><a href="#method.eq_vec">eq_vec</a><a href="#method.truncate">truncate</a><a href="#method.reserve">reserve</a><a href="#method.reserve_exact">reserve_exact</a><a href="#method.capacity">capacity</a><a href="#method.grow">grow</a><a href="#method.pop">pop</a><a href="#method.push">push</a><a href="#method.len">len</a><a href="#method.set_len">set_len</a><a href="#method.is_empty">is_empty</a><a href="#method.clear">clear</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Index%3Cusize%3E">Index<usize></a><a href="#impl-Default">Default</a><a href="#impl-FromIterator%3Cbool%3E">FromIterator<bool></a><a href="#impl-Extend%3Cbool%3E">Extend<bool></a><a href="#impl-Clone">Clone</a><a href="#impl-PartialOrd">PartialOrd</a><a href="#impl-Ord">Ord</a><a href="#impl-Debug">Debug</a><a href="#impl-Hash">Hash</a><a href="#impl-PartialEq">PartialEq</a><a href="#impl-Eq">Eq</a><a href="#impl-IntoIterator">IntoIterator</a></div></div><p class='location'><a href='index.html'>bit_vec</a></p><script>window.sidebarCurrent = {name: 'BitVec', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
|
||
</nav>
|
||
|
||
<div class="theme-picker">
|
||
<button id="theme-picker" aria-label="Pick another theme!">
|
||
<img src="../brush.svg" width="18" alt="Pick another theme!">
|
||
</button>
|
||
<div id="theme-choices"></div>
|
||
</div>
|
||
<script src="../theme.js"></script>
|
||
<nav class="sub">
|
||
<form class="search-form js-only">
|
||
<div class="search-container">
|
||
<input class="search-input" name="search"
|
||
autocomplete="off"
|
||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||
type="search">
|
||
</div>
|
||
</form>
|
||
</nav>
|
||
|
||
<section id='main' class="content">
|
||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>bit_vec</a>::<wbr><a class="struct" href=''>BitVec</a></span><span class='out-of-band'><span id='render-detail'>
|
||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||
[<span class='inner'>−</span>]
|
||
</a>
|
||
</span><a class='srclink' href='../src/bit_vec/lib.rs.html#199-204' title='goto source code'>[src]</a></span></h1>
|
||
<pre class='rust struct'>pub struct BitVec<B = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>> { /* fields omitted */ }</pre><div class='docblock'><p>The bitvector type.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_elem</span>(<span class="number">10</span>, <span class="bool-val">false</span>);
|
||
|
||
<span class="comment">// insert all primes less than 10</span>
|
||
<span class="ident">bv</span>.<span class="ident">set</span>(<span class="number">2</span>, <span class="bool-val">true</span>);
|
||
<span class="ident">bv</span>.<span class="ident">set</span>(<span class="number">3</span>, <span class="bool-val">true</span>);
|
||
<span class="ident">bv</span>.<span class="ident">set</span>(<span class="number">5</span>, <span class="bool-val">true</span>);
|
||
<span class="ident">bv</span>.<span class="ident">set</span>(<span class="number">7</span>, <span class="bool-val">true</span>);
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{:?}"</span>, <span class="ident">bv</span>);
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"total bits set to true: {}"</span>, <span class="ident">bv</span>.<span class="ident">iter</span>().<span class="ident">filter</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">x</span>).<span class="ident">count</span>());
|
||
|
||
<span class="comment">// flip all values in bitvector, producing non-primes less than 10</span>
|
||
<span class="ident">bv</span>.<span class="ident">negate</span>();
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{:?}"</span>, <span class="ident">bv</span>);
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"total bits set to true: {}"</span>, <span class="ident">bv</span>.<span class="ident">iter</span>().<span class="ident">filter</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">x</span>).<span class="ident">count</span>());
|
||
|
||
<span class="comment">// reset bitvector to empty</span>
|
||
<span class="ident">bv</span>.<span class="ident">clear</span>();
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{:?}"</span>, <span class="ident">bv</span>);
|
||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"total bits set to true: {}"</span>, <span class="ident">bv</span>.<span class="ident">iter</span>().<span class="ident">filter</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">x</span>).<span class="ident">count</span>());</pre>
|
||
</div>
|
||
<h2 id='methods' class='small-section-header'>
|
||
Methods<a href='#methods' class='anchor'></a>
|
||
</h2>
|
||
<h3 id='impl' class='impl'><span class='in-band'><code>impl <a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#245-365' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>() -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#256-258' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Creates an empty <code>BitVec</code>.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">new</span>();</pre>
|
||
</div><h4 id='method.from_elem' class="method"><span id='from_elem.v' class='invisible'><code>pub fn <a href='#method.from_elem' class='fnname'>from_elem</a>(nbits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, bit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#275-283' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Creates a <code>BitVec</code> that holds <code>nbits</code> elements, setting each element
|
||
to <code>bit</code>.</p>
|
||
<h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_elem</span>(<span class="number">10</span>, <span class="bool-val">false</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">len</span>(), <span class="number">10</span>);
|
||
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="ident">bv</span>.<span class="ident">iter</span>() {
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">x</span>, <span class="bool-val">false</span>);
|
||
}</pre>
|
||
</div><h4 id='method.with_capacity' class="method"><span id='with_capacity.v' class='invisible'><code>pub fn <a href='#method.with_capacity' class='fnname'>with_capacity</a>(nbits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#293-298' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Constructs a new, empty <code>BitVec</code> with the specified capacity.</p>
|
||
<p>The bitvector will be able to hold at least <code>capacity</code> bits without
|
||
reallocating. If <code>capacity</code> is 0, it will not allocate.</p>
|
||
<p>It is important to note that this function does not specify the
|
||
<em>length</em> of the returned bitvector, but only the <em>capacity</em>.</p>
|
||
</div><h4 id='method.from_bytes' class="method"><span id='from_bytes.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#315-342' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Transforms a byte-vector into a <code>BitVec</code>. Each byte becomes eight bits,
|
||
with the most significant bits of each byte coming first. Each
|
||
bit becomes <code>true</code> if equal to 1 or <code>false</code> if equal to 0.</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_vec</span>::<span class="ident">BitVec</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">0b10100000</span>, <span class="number">0b00010010</span>]);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">eq_vec</span>(<span class="kw-2">&</span>[<span class="bool-val">true</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>,
|
||
<span class="bool-val">false</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>,
|
||
<span class="bool-val">false</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>,
|
||
<span class="bool-val">false</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>]));</pre>
|
||
</div><h4 id='method.from_fn' class="method"><span id='from_fn.v' class='invisible'><code>pub fn <a href='#method.from_fn' class='fnname'>from_fn</a><F>(len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, f: F) -> Self <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#356-364' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Creates a <code>BitVec</code> of the specified length where the value at each index
|
||
is <code>f(index)</code>.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_fn</span>(<span class="number">5</span>, <span class="op">|</span><span class="ident">i</span><span class="op">|</span> { <span class="ident">i</span> <span class="op">%</span> <span class="number">2</span> <span class="op">==</span> <span class="number">0</span> });
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">eq_vec</span>(<span class="kw-2">&</span>[<span class="bool-val">true</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>]));</pre>
|
||
</div></div><h3 id='impl-1' class='impl'><span class='in-band'><code>impl<B: <a class="trait" href="../bit_vec/trait.BitBlock.html" title="trait bit_vec::BitBlock">BitBlock</a>> <a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#367-1094' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.blocks' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../bit_vec/struct.Blocks.html" title="struct bit_vec::Blocks">Blocks</a><'a, B></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bit_vec/struct.Blocks.html" title="struct bit_vec::Blocks">Blocks</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/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../bit_vec/struct.Blocks.html" title="struct bit_vec::Blocks">Blocks</a><'a, B></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = B;</span></code></div></div><span id='blocks.v' class='invisible'><code>pub fn <a href='#method.blocks' class='fnname'>blocks</a>(&self) -> <a class="struct" href="../bit_vec/struct.Blocks.html" title="struct bit_vec::Blocks">Blocks</a><B></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#395-398' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Iterator over the underlying blocks of data</p>
|
||
</div><h4 id='method.storage' class="method"><span id='storage.v' class='invisible'><code>pub fn <a href='#method.storage' class='fnname'>storage</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[B]</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#404-406' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Exposes the raw block storage of this BitVec</p>
|
||
<p>Only really intended for BitSet.</p>
|
||
</div><h4 id='method.storage_mut' class="method"><span id='storage_mut.v' class='invisible'><code>pub unsafe fn <a href='#method.storage_mut' class='fnname'>storage_mut</a>(&mut self) -> &mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><B></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#412-414' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Exposes the raw block storage of this BitVec</p>
|
||
<p>Can probably cause unsafety. Only really intended for BitSet.</p>
|
||
</div><h4 id='method.get' class="method"><span id='get.v' class='invisible'><code>pub fn <a href='#method.get' class='fnname'>get</a>(&self, i: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#445-454' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Retrieves the value at index <code>i</code>, or <code>None</code> if the index is out of bounds.</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_vec</span>::<span class="ident">BitVec</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="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">get</span>(<span class="number">0</span>), <span class="prelude-val">Some</span>(<span class="bool-val">false</span>));
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">get</span>(<span class="number">1</span>), <span class="prelude-val">Some</span>(<span class="bool-val">true</span>));
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">get</span>(<span class="number">100</span>), <span class="prelude-val">None</span>);
|
||
|
||
<span class="comment">// Can also use array indexing</span>
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>[<span class="number">1</span>], <span class="bool-val">true</span>);</pre>
|
||
</div><h4 id='method.set' class="method"><span id='set.v' class='invisible'><code>pub fn <a href='#method.set' class='fnname'>set</a>(&mut self, i: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#472-480' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Sets the value of a bit at an index <code>i</code>.</p>
|
||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||
<p>Panics if <code>i</code> is out of bounds.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_elem</span>(<span class="number">5</span>, <span class="bool-val">false</span>);
|
||
<span class="ident">bv</span>.<span class="ident">set</span>(<span class="number">3</span>, <span class="bool-val">true</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>[<span class="number">3</span>], <span class="bool-val">true</span>);</pre>
|
||
</div><h4 id='method.set_all' class="method"><span id='set_all.v' class='invisible'><code>pub fn <a href='#method.set_all' class='fnname'>set_all</a>(&mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#497-500' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Sets all bits to 1.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">before</span> <span class="op">=</span> <span class="number">0b01100000</span>;
|
||
<span class="kw">let</span> <span class="ident">after</span> <span class="op">=</span> <span class="number">0b11111111</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</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="ident">before</span>]);
|
||
<span class="ident">bv</span>.<span class="ident">set_all</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>, <span class="ident">BitVec</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">after</span>]));</pre>
|
||
</div><h4 id='method.negate' class="method"><span id='negate.v' class='invisible'><code>pub fn <a href='#method.negate' class='fnname'>negate</a>(&mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#517-520' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Flips all bits.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">before</span> <span class="op">=</span> <span class="number">0b01100000</span>;
|
||
<span class="kw">let</span> <span class="ident">after</span> <span class="op">=</span> <span class="number">0b10011111</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</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="ident">before</span>]);
|
||
<span class="ident">bv</span>.<span class="ident">negate</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>, <span class="ident">BitVec</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">after</span>]));</pre>
|
||
</div><h4 id='method.union' class="method"><span id='union.v' class='invisible'><code>pub fn <a href='#method.union' class='fnname'>union</a>(&mut 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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#548-550' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Calculates the union of two bitvectors. This acts like the bitwise <code>or</code>
|
||
function.</p>
|
||
<p>Sets <code>self</code> to the union of <code>self</code> and <code>other</code>. Both bitvectors must be
|
||
the same length. Returns <code>true</code> if <code>self</code> changed.</p>
|
||
<h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1>
|
||
<p>Panics if the bitvectors are of different lengths.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="number">0b01100100</span>;
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="number">0b01011010</span>;
|
||
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="number">0b01111110</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">BitVec</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">BitVec</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">b</span>]);
|
||
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">a</span>.<span class="ident">union</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">BitVec</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">res</span>]));</pre>
|
||
</div><h4 id='method.intersect' class="method"><span id='intersect.v' class='invisible'><code>pub fn <a href='#method.intersect' class='fnname'>intersect</a>(&mut 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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#578-580' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Calculates the intersection of two bitvectors. This acts like the
|
||
bitwise <code>and</code> function.</p>
|
||
<p>Sets <code>self</code> to the intersection of <code>self</code> and <code>other</code>. Both bitvectors
|
||
must be the same length. Returns <code>true</code> if <code>self</code> changed.</p>
|
||
<h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1>
|
||
<p>Panics if the bitvectors are of different lengths.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="number">0b01100100</span>;
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="number">0b01011010</span>;
|
||
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="number">0b01000000</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">a</span> <span class="op">=</span> <span class="ident">BitVec</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">BitVec</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">b</span>]);
|
||
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">a</span>.<span class="ident">intersect</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">BitVec</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">res</span>]));</pre>
|
||
</div><h4 id='method.difference' class="method"><span id='difference.v' class='invisible'><code>pub fn <a href='#method.difference' class='fnname'>difference</a>(&mut 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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#615-617' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Calculates the difference between two bitvectors.</p>
|
||
<p>Sets each element of <code>self</code> to the value of that element minus the
|
||
element of <code>other</code> at the same index. Both bitvectors must be the same
|
||
length. Returns <code>true</code> if <code>self</code> changed.</p>
|
||
<h1 id="panics-3" class="section-header"><a href="#panics-3">Panics</a></h1>
|
||
<p>Panics if the bitvectors are of different length.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">a</span> <span class="op">=</span> <span class="number">0b01100100</span>;
|
||
<span class="kw">let</span> <span class="ident">b</span> <span class="op">=</span> <span class="number">0b01011010</span>;
|
||
<span class="kw">let</span> <span class="ident">a_b</span> <span class="op">=</span> <span class="number">0b00100100</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">0b00011010</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">BitVec</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">BitVec</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">b</span>]);
|
||
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bva</span>.<span class="ident">difference</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">BitVec</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">bva</span> <span class="op">=</span> <span class="ident">BitVec</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">BitVec</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">b</span>]);
|
||
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bvb</span>.<span class="ident">difference</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">BitVec</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&</span>[<span class="ident">b_a</span>]));</pre>
|
||
</div><h4 id='method.all' class="method"><span id='all.v' class='invisible'><code>pub fn <a href='#method.all' class='fnname'>all</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#633-642' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns <code>true</code> if all bits are 1.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_elem</span>(<span class="number">5</span>, <span class="bool-val">true</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">all</span>(), <span class="bool-val">true</span>);
|
||
|
||
<span class="ident">bv</span>.<span class="ident">set</span>(<span class="number">1</span>, <span class="bool-val">false</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">all</span>(), <span class="bool-val">false</span>);</pre>
|
||
</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_vec/struct.Iter.html" title="struct bit_vec::Iter">Iter</a><'a, B></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bit_vec/struct.Iter.html" title="struct bit_vec::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/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../bit_vec/struct.Iter.html" title="struct bit_vec::Iter">Iter</a><'a, B></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;</span></code></div></div><span id='iter.v' class='invisible'><code>pub fn <a href='#method.iter' class='fnname'>iter</a>(&self) -> <a class="struct" href="../bit_vec/struct.Iter.html" title="struct bit_vec::Iter">Iter</a><B></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#655-657' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns an iterator over the elements of the vector in order.</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_vec</span>::<span class="ident">BitVec</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">0b01110100</span>, <span class="number">0b10010010</span>]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">iter</span>().<span class="ident">filter</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">x</span>).<span class="ident">count</span>(), <span class="number">7</span>);</pre>
|
||
</div><h4 id='method.none' class="method"><span id='none.v' class='invisible'><code>pub fn <a href='#method.none' class='fnname'>none</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#778-780' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns <code>true</code> if all bits are 0.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_elem</span>(<span class="number">10</span>, <span class="bool-val">false</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">none</span>(), <span class="bool-val">true</span>);
|
||
|
||
<span class="ident">bv</span>.<span class="ident">set</span>(<span class="number">3</span>, <span class="bool-val">true</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">none</span>(), <span class="bool-val">false</span>);</pre>
|
||
</div><h4 id='method.any' class="method"><span id='any.v' class='invisible'><code>pub fn <a href='#method.any' class='fnname'>any</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#796-798' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns <code>true</code> if any bit is 1.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_elem</span>(<span class="number">10</span>, <span class="bool-val">false</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">any</span>(), <span class="bool-val">false</span>);
|
||
|
||
<span class="ident">bv</span>.<span class="ident">set</span>(<span class="number">3</span>, <span class="bool-val">true</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">any</span>(), <span class="bool-val">true</span>);</pre>
|
||
</div><h4 id='method.to_bytes' class="method"><span id='to_bytes.v' class='invisible'><code>pub fn <a href='#method.to_bytes' class='fnname'>to_bytes</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#821-844' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Organises the bits into bytes, such that the first bit in the
|
||
<code>BitVec</code> becomes the high-order bit of the first byte. If the
|
||
size of the <code>BitVec</code> is not a multiple of eight then trailing bits
|
||
will be filled-in with <code>false</code>.</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_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_elem</span>(<span class="number">3</span>, <span class="bool-val">true</span>);
|
||
<span class="ident">bv</span>.<span class="ident">set</span>(<span class="number">1</span>, <span class="bool-val">false</span>);
|
||
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">to_bytes</span>(), [<span class="number">0b10100000</span>]);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_elem</span>(<span class="number">9</span>, <span class="bool-val">false</span>);
|
||
<span class="ident">bv</span>.<span class="ident">set</span>(<span class="number">2</span>, <span class="bool-val">true</span>);
|
||
<span class="ident">bv</span>.<span class="ident">set</span>(<span class="number">8</span>, <span class="bool-val">true</span>);
|
||
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">to_bytes</span>(), [<span class="number">0b00100000</span>, <span class="number">0b10000000</span>]);</pre>
|
||
</div><h4 id='method.eq_vec' class="method"><span id='eq_vec.v' class='invisible'><code>pub fn <a href='#method.eq_vec' class='fnname'>eq_vec</a>(&self, v: <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.bool.html">bool</a><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.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#864-867' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Compares a <code>BitVec</code> to a slice of <code>bool</code>s.
|
||
Both the <code>BitVec</code> and slice must have the same length.</p>
|
||
<h1 id="panics-4" class="section-header"><a href="#panics-4">Panics</a></h1>
|
||
<p>Panics if the <code>BitVec</code> and slice are of different length.</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_vec</span>::<span class="ident">BitVec</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">0b10100000</span>]);
|
||
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">eq_vec</span>(<span class="kw-2">&</span>[<span class="bool-val">true</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>,
|
||
<span class="bool-val">false</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>]));</pre>
|
||
</div><h4 id='method.truncate' class="method"><span id='truncate.v' class='invisible'><code>pub fn <a href='#method.truncate' class='fnname'>truncate</a>(&mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#884-891' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Shortens a <code>BitVec</code>, dropping excess elements.</p>
|
||
<p>If <code>len</code> is greater than the vector's current length, this has no
|
||
effect.</p>
|
||
<h1 id="examples-18" class="section-header"><a href="#examples-18">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</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">0b01001011</span>]);
|
||
<span class="ident">bv</span>.<span class="ident">truncate</span>(<span class="number">2</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">eq_vec</span>(<span class="kw-2">&</span>[<span class="bool-val">false</span>, <span class="bool-val">true</span>]));</pre>
|
||
</div><h4 id='method.reserve' class="method"><span id='reserve.v' class='invisible'><code>pub fn <a href='#method.reserve' class='fnname'>reserve</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#911-917' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Reserves capacity for at least <code>additional</code> more bits to be inserted in the given
|
||
<code>BitVec</code>. The collection may reserve more space to avoid frequent reallocations.</p>
|
||
<h1 id="panics-5" class="section-header"><a href="#panics-5">Panics</a></h1>
|
||
<p>Panics if the new capacity overflows <code>usize</code>.</p>
|
||
<h1 id="examples-19" class="section-header"><a href="#examples-19">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_elem</span>(<span class="number">3</span>, <span class="bool-val">false</span>);
|
||
<span class="ident">bv</span>.<span class="ident">reserve</span>(<span class="number">10</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">len</span>(), <span class="number">3</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">capacity</span>() <span class="op">>=</span> <span class="number">13</span>);</pre>
|
||
</div><h4 id='method.reserve_exact' class="method"><span id='reserve_exact.v' class='invisible'><code>pub fn <a href='#method.reserve_exact' class='fnname'>reserve_exact</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#941-947' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Reserves the minimum capacity for exactly <code>additional</code> more bits to be inserted in the
|
||
given <code>BitVec</code>. Does nothing if the capacity is already sufficient.</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</code> if future
|
||
insertions are expected.</p>
|
||
<h1 id="panics-6" class="section-header"><a href="#panics-6">Panics</a></h1>
|
||
<p>Panics if the new capacity overflows <code>usize</code>.</p>
|
||
<h1 id="examples-20" class="section-header"><a href="#examples-20">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">from_elem</span>(<span class="number">3</span>, <span class="bool-val">false</span>);
|
||
<span class="ident">bv</span>.<span class="ident">reserve</span>(<span class="number">10</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">len</span>(), <span class="number">3</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">capacity</span>() <span class="op">>=</span> <span class="number">13</span>);</pre>
|
||
</div><h4 id='method.capacity' class="method"><span id='capacity.v' class='invisible'><code>pub fn <a href='#method.capacity' class='fnname'>capacity</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#962-964' title='goto source code'>[src]</a></span></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-21" class="section-header"><a href="#examples-21">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">new</span>();
|
||
<span class="ident">bv</span>.<span class="ident">reserve</span>(<span class="number">10</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">capacity</span>() <span class="op">>=</span> <span class="number">10</span>);</pre>
|
||
</div><h4 id='method.grow' class="method"><span id='grow.v' class='invisible'><code>pub fn <a href='#method.grow' class='fnname'>grow</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#982-1019' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Grows the <code>BitVec</code> in-place, adding <code>n</code> copies of <code>value</code> to the <code>BitVec</code>.</p>
|
||
<h1 id="panics-7" class="section-header"><a href="#panics-7">Panics</a></h1>
|
||
<p>Panics if the new len overflows a <code>usize</code>.</p>
|
||
<h1 id="examples-22" class="section-header"><a href="#examples-22">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</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">0b01001011</span>]);
|
||
<span class="ident">bv</span>.<span class="ident">grow</span>(<span class="number">2</span>, <span class="bool-val">true</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">len</span>(), <span class="number">10</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">to_bytes</span>(), [<span class="number">0b01001011</span>, <span class="number">0b11000000</span>]);</pre>
|
||
</div><h4 id='method.pop' class="method"><span id='pop.v' class='invisible'><code>pub fn <a href='#method.pop' class='fnname'>pop</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1034-1049' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Removes the last bit from the BitVec, and returns it. Returns None if the BitVec is empty.</p>
|
||
<h1 id="examples-23" class="section-header"><a href="#examples-23">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</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">0b01001001</span>]);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">pop</span>(), <span class="prelude-val">Some</span>(<span class="bool-val">true</span>));
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">pop</span>(), <span class="prelude-val">Some</span>(<span class="bool-val">false</span>));
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">len</span>(), <span class="number">6</span>);</pre>
|
||
</div><h4 id='method.push' class="method"><span id='push.v' class='invisible'><code>pub fn <a href='#method.push' class='fnname'>push</a>(&mut self, elem: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1064-1071' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Pushes a <code>bool</code> onto the end.</p>
|
||
<h1 id="examples-24" class="section-header"><a href="#examples-24">Examples</a></h1>
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bit_vec</span>::<span class="ident">BitVec</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bv</span> <span class="op">=</span> <span class="ident">BitVec</span>::<span class="ident">new</span>();
|
||
<span class="ident">bv</span>.<span class="ident">push</span>(<span class="bool-val">true</span>);
|
||
<span class="ident">bv</span>.<span class="ident">push</span>(<span class="bool-val">false</span>);
|
||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">bv</span>.<span class="ident">eq_vec</span>(<span class="kw-2">&</span>[<span class="bool-val">true</span>, <span class="bool-val">false</span>]));</pre>
|
||
</div><h4 id='method.len' class="method"><span id='len.v' class='invisible'><code>pub fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1075' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns the total number of bits in this vector</p>
|
||
</div><h4 id='method.set_len' class="method"><span id='set_len.v' class='invisible'><code>pub unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1081-1083' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Sets the number of bits that this BitVec considers initialized.</p>
|
||
<p>Almost certainly can cause bad stuff. Only really intended for BitSet.</p>
|
||
</div><h4 id='method.is_empty' class="method"><span id='is_empty.v' class='invisible'><code>pub fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1087' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns true if there are no bits in this vector</p>
|
||
</div><h4 id='method.clear' class="method"><span id='clear.v' class='invisible'><code>pub fn <a href='#method.clear' class='fnname'>clear</a>(&mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1091-1093' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Clears all bits in this vector.</p>
|
||
</div></div>
|
||
<h2 id='implementations' class='small-section-header'>
|
||
Trait Implementations<a href='#implementations' class='anchor'></a>
|
||
</h2>
|
||
<h3 id='impl-Index%3Cusize%3E' class='impl'><span class='in-band'><code>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/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-Index%3Cusize%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#207-218' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='associatedtype.Output' class="type"><span id='Output.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></h4>
|
||
<div class='docblock'><p>The returned type after indexing.</p>
|
||
</div><h4 id='method.index' class="method"><span id='index.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index' class='fnname'>index</a>(&self, i: <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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#211-217' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Performs the indexing (<code>container[index]</code>) operation.</p>
|
||
</div></div><h3 id='impl-Default' class='impl'><span class='in-band'><code>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_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-Default' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1096-1099' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1098' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><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><h3 id='impl-FromIterator%3Cbool%3E' class='impl'><span class='in-band'><code>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/trait.FromIterator.html" title="trait core::iter::traits::FromIterator">FromIterator</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>> for <a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-FromIterator%3Cbool%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1101-1108' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.from_iter' class="method"><span id='from_iter.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter' class='fnname'>from_iter</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>>>(iter: I) -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1103-1107' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
|
||
</div></div><h3 id='impl-Extend%3Cbool%3E' class='impl'><span class='in-band'><code>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/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>> for <a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-Extend%3Cbool%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1110-1120' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.extend' class="method"><span id='extend.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend' class='fnname'>extend</a><I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>>>(&mut self, iterable: I)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1112-1119' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend">Read more</a></p>
|
||
</div></div><h3 id='impl-Clone' class='impl'><span class='in-band'><code>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_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1122-1133' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1124-1126' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1129-1132' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||
</div></div><h3 id='impl-PartialOrd' class='impl'><span class='in-band'><code>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> for <a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-PartialOrd' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1135-1140' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.partial_cmp' class="method"><span id='partial_cmp.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1137-1139' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><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"><span id='lt.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-Ord' class='impl'><span class='in-band'><code>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_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-Ord' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1142-1159' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.cmp' class="method"><span id='cmp.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1144-1158' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><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"><span id='max.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><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#460-463' title='goto source code'>[src]</a></span></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"><span id='min.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><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#476-479' title='goto source code'>[src]</a></span></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></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>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_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1161-1168' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, 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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1162-1167' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||
</div></div><h3 id='impl-Hash' class='impl'><span class='in-band'><code>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_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-Hash' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1170-1178' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.hash' class="method"><span id='hash.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1172-1177' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><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"><span id='hash_slice.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><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#202-208' title='goto source code'>[src]</a></span></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-PartialEq' class='impl'><span class='in-band'><code>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> for <a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-PartialEq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1180-1188' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: <a class="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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1182-1187' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||
</div><h4 id='method.ne' class="method"><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-Eq' class='impl'><span class='in-band'><code>impl<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_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-Eq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1190' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'></div><h3 id='impl-IntoIterator' class='impl'><span class='in-band'><code>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/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a> for &'a <a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-IntoIterator' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1224-1232' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='associatedtype.Item' class="type"><span id='Item.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></h4>
|
||
<div class='docblock'><p>The type of the elements being iterated over.</p>
|
||
</div><h4 id='associatedtype.IntoIter' class="type"><span id='IntoIter.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="../bit_vec/struct.Iter.html" title="struct bit_vec::Iter">Iter</a><'a, B></code></span></h4>
|
||
<div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
||
</div><h4 id='method.into_iter' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../bit_vec/struct.Iter.html" title="struct bit_vec::Iter">Iter</a><'a, B></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bit_vec/struct.Iter.html" title="struct bit_vec::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/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../bit_vec/struct.Iter.html" title="struct bit_vec::Iter">Iter</a><'a, B></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;</span></code></div></div><span id='into_iter.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -> <a class="struct" href="../bit_vec/struct.Iter.html" title="struct bit_vec::Iter">Iter</a><'a, B></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1229-1231' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
||
</div></div><h3 id='impl-IntoIterator-1' class='impl'><span class='in-band'><code>impl<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/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a> for <a class="struct" href="../bit_vec/struct.BitVec.html" title="struct bit_vec::BitVec">BitVec</a><B></code><a href='#impl-IntoIterator-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1258-1267' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='associatedtype.Item-1' class="type"><span id='Item.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></h4>
|
||
<div class='docblock'><p>The type of the elements being iterated over.</p>
|
||
</div><h4 id='associatedtype.IntoIter-1' class="type"><span id='IntoIter.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="../bit_vec/struct.IntoIter.html" title="struct bit_vec::IntoIter">IntoIter</a><B></code></span></h4>
|
||
<div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
||
</div><h4 id='method.into_iter-1' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../bit_vec/struct.IntoIter.html" title="struct bit_vec::IntoIter">IntoIter</a><B></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../bit_vec/struct.IntoIter.html" title="struct bit_vec::IntoIter">IntoIter</a><B></h3><code class="content"><span class="where fmt-newline">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/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../bit_vec/struct.IntoIter.html" title="struct bit_vec::IntoIter">IntoIter</a><B></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;</span></code></div></div><span id='into_iter.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -> <a class="struct" href="../bit_vec/struct.IntoIter.html" title="struct bit_vec::IntoIter">IntoIter</a><B></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/bit_vec/lib.rs.html#1263-1266' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
||
</div></div></section>
|
||
<section id='search' class="content hidden"></section>
|
||
|
||
<section class="footer"></section>
|
||
|
||
<aside id="help" class="hidden">
|
||
<div>
|
||
<h1 class="hidden">Help</h1>
|
||
|
||
<div class="shortcuts">
|
||
<h2>Keyboard Shortcuts</h2>
|
||
|
||
<dl>
|
||
<dt><kbd>?</kbd></dt>
|
||
<dd>Show this help dialog</dd>
|
||
<dt><kbd>S</kbd></dt>
|
||
<dd>Focus the search field</dd>
|
||
<dt><kbd>↑</kbd></dt>
|
||
<dd>Move up in search results</dd>
|
||
<dt><kbd>↓</kbd></dt>
|
||
<dd>Move down in search results</dd>
|
||
<dt><kbd>↹</kbd></dt>
|
||
<dd>Switch tab</dd>
|
||
<dt><kbd>⏎</kbd></dt>
|
||
<dd>Go to active search result</dd>
|
||
<dt><kbd>+</kbd></dt>
|
||
<dd>Expand all sections</dd>
|
||
<dt><kbd>-</kbd></dt>
|
||
<dd>Collapse all sections</dd>
|
||
</dl>
|
||
</div>
|
||
|
||
<div class="infos">
|
||
<h2>Search Tricks</h2>
|
||
|
||
<p>
|
||
Prefix searches with a type followed by a colon (e.g.
|
||
<code>fn:</code>) to restrict the search to a given type.
|
||
</p>
|
||
|
||
<p>
|
||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||
<code>struct</code>, <code>enum</code>,
|
||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||
and <code>const</code>.
|
||
</p>
|
||
|
||
<p>
|
||
Search functions by type signature (e.g.
|
||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</aside>
|
||
|
||
|
||
|
||
<script>
|
||
window.rootPath = "../";
|
||
window.currentCrate = "bit_vec";
|
||
</script>
|
||
<script src="../main.js"></script>
|
||
<script defer src="../search-index.js"></script>
|
||
</body>
|
||
</html> |