-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.html
15 lines (13 loc) · 9.96 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!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="`SmallBitVec` is a bit vector, a vector of single-bit values stored compactly in memory."><title>smallbitvec - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-46132b98.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="smallbitvec" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0 (4d91de4e4 2025-02-17)" data-channel="1.85.0" data-search-js="search-75f5ac3e.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../smallbitvec/index.html">smallbitvec</a><span class="version">2.6.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li></ul><h3><a href="#macros">Crate Items</a></h3><ul class="block"><li><a href="#macros" title="Macros">Macros</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#functions" title="Functions">Functions</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>smallbitvec</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/smallbitvec/lib.rs.html#10-1063">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><a href="struct.SmallBitVec.html"><code>SmallBitVec</code></a> is a bit vector, a vector of single-bit values stored compactly in memory.</p>
<p>SmallBitVec grows dynamically, like the standard <code>Vec<T></code> type. It can hold up to about one
word of bits inline (without a separate heap allocation). If the number of bits exceeds this
inline capacity, it will allocate a buffer on the heap.</p>
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>smallbitvec::SmallBitVec;
<span class="kw">let </span><span class="kw-2">mut </span>v = SmallBitVec::new();
v.push(<span class="bool-val">true</span>);
v.push(<span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(v[<span class="number">0</span>], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(v[<span class="number">1</span>], <span class="bool-val">false</span>);</code></pre></div>
</div></details><h2 id="macros" class="section-header">Macros<a href="#macros" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="macro" href="macro.const_debug_assert_le.html" title="macro smallbitvec::const_debug_assert_le">const_<wbr>debug_<wbr>assert_<wbr>le</a><span title="Restricted Visibility"> 🔒</span> </div></li><li><div class="item-name"><a class="macro" href="macro.sbvec.html" title="macro smallbitvec::sbvec">sbvec</a></div><div class="desc docblock-short">Creates a <a href="struct.SmallBitVec.html" title="struct smallbitvec::SmallBitVec"><code>SmallBitVec</code></a> containing the arguments.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Header.html" title="struct smallbitvec::Header">Header</a><span title="Restricted Visibility"> 🔒</span> </div><div class="desc docblock-short">Data stored at the start of the heap allocation.</div></li><li><div class="item-name"><a class="struct" href="struct.IntoIter.html" title="struct smallbitvec::IntoIter">Into<wbr>Iter</a></div><div class="desc docblock-short">An iterator that owns a SmallBitVec and yields its bits as <code>bool</code> values.</div></li><li><div class="item-name"><a class="struct" href="struct.Iter.html" title="struct smallbitvec::Iter">Iter</a></div><div class="desc docblock-short">An iterator that borrows a SmallBitVec and yields its bits as <code>bool</code> values.</div></li><li><div class="item-name"><a class="struct" href="struct.SmallBitVec.html" title="struct smallbitvec::SmallBitVec">Small<wbr>BitVec</a></div><div class="desc docblock-short">A resizable bit vector, optimized for size and inline storage.</div></li><li><div class="item-name"><a class="struct" href="struct.VecRange.html" title="struct smallbitvec::VecRange">VecRange</a></div><div class="desc docblock-short">An immutable view of a range of bits from a borrowed SmallBitVec.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.InternalStorage.html" title="enum smallbitvec::InternalStorage">Internal<wbr>Storage</a></div><div class="desc docblock-short">A typed representation of a <code>SmallBitVec</code>’s internal storage.</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.HEAP_FLAG.html" title="constant smallbitvec::HEAP_FLAG">HEAP_<wbr>FLAG</a><span title="Restricted Visibility"> 🔒</span> </div><div class="desc docblock-short">If the rightmost bit of <code>data</code> is set, then the remaining bits of <code>data</code>
are a pointer to a heap allocation.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.bits_per_storage.html" title="fn smallbitvec::bits_per_storage">bits_<wbr>per_<wbr>storage</a><span title="Restricted Visibility"> 🔒</span> </div><div class="desc docblock-short">The number of bits in one <code>Storage</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.buffer_len.html" title="fn smallbitvec::buffer_len">buffer_<wbr>len</a><span title="Restricted Visibility"> 🔒</span> </div><div class="desc docblock-short">The minimum number of <code>Storage</code> elements to hold at least <code>cap</code> bits.</div></li><li><div class="item-name"><a class="fn" href="fn.header_len.html" title="fn smallbitvec::header_len">header_<wbr>len</a><span title="Restricted Visibility"> 🔒</span> </div><div class="desc docblock-short">The number of <code>Storage</code> elements to allocate to hold a header.</div></li><li><div class="item-name"><a class="fn" href="fn.inline_bits.html" title="fn smallbitvec::inline_bits">inline_<wbr>bits</a><span title="Restricted Visibility"> 🔒</span> </div><div class="desc docblock-short">Total number of bits per word.</div></li><li><div class="item-name"><a class="fn" href="fn.inline_capacity.html" title="fn smallbitvec::inline_capacity">inline_<wbr>capacity</a><span title="Restricted Visibility"> 🔒</span> </div><div class="desc docblock-short">For an inline vector, all bits except two can be used as storage capacity:</div></li><li><div class="item-name"><a class="fn" href="fn.inline_index.html" title="fn smallbitvec::inline_index">inline_<wbr>index</a><span title="Restricted Visibility"> 🔒</span> </div><div class="desc docblock-short">An inline vector with the nth bit set.</div></li><li><div class="item-name"><a class="fn" href="fn.inline_ones.html" title="fn smallbitvec::inline_ones">inline_<wbr>ones</a><span title="Restricted Visibility"> 🔒</span> </div><div class="desc docblock-short">An inline vector with the leftmost <code>n</code> bits set.</div></li><li><div class="item-name"><a class="fn" href="fn.inline_shift.html" title="fn smallbitvec::inline_shift">inline_<wbr>shift</a><span title="Restricted Visibility"> 🔒</span> </div><div class="desc docblock-short">Left shift amount to access the nth bit</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.Storage.html" title="type smallbitvec::Storage">Storage</a><span title="Restricted Visibility"> 🔒</span> </div><div class="desc docblock-short">The allocation will contain a <code>Header</code> followed by a <a href="type.Storage.html" title="type smallbitvec::Storage">Storage</a> buffer.</div></li></ul></section></div></main></body></html>