Files
greptimedb/common_base/bit_vec/prelude/struct.BitPtr.html
2025-12-23 10:07:07 +00:00

707 lines
170 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="Single-Bit Pointer"><title>BitPtr in common_base::bit_vec::prelude - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="common_base" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">BitPtr</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../common_base/index.html">common_<wbr>base</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">BitPtr</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#single-bit-pointer" title="Single-Bit Pointer">Single-Bit Pointer</a><ul><li><a href="#original" title="Original">Original</a></li><li><a href="#api-differences" title="API Differences">API Differences</a></li><li><a href="#abi-differences" title="ABI Differences">ABI Differences</a></li><li><a href="#type-parameters" title="Type Parameters">Type Parameters</a></li><li><a href="#usage" title="Usage">Usage</a></li><li><a href="#safety" title="Safety">Safety</a></li></ul></li></ul><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield._or" title="_or">_or</a></li><li><a href="#structfield.bit" title="bit">bit</a></li><li><a href="#structfield.ptr" title="ptr">ptr</a></li></ul><h3><a href="#implementations">Associated Constants</a></h3><ul class="block associatedconstant"><li><a href="#associatedconstant.DANGLING" title="DANGLING">DANGLING</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.add" title="add">add</a></li><li><a href="#method.address" title="address">address</a></li><li><a href="#method.align_offset" title="align_offset">align_offset</a></li><li><a href="#method.as_mut" title="as_mut">as_mut</a></li><li><a href="#method.as_ref" title="as_ref">as_ref</a></li><li><a href="#method.bit" title="bit">bit</a></li><li><a href="#method.cast" title="cast">cast</a></li><li><a href="#method.copy_from" title="copy_from">copy_from</a></li><li><a href="#method.copy_from_nonoverlapping" title="copy_from_nonoverlapping">copy_from_nonoverlapping</a></li><li><a href="#method.copy_to" title="copy_to">copy_to</a></li><li><a href="#method.copy_to_nonoverlapping" title="copy_to_nonoverlapping">copy_to_nonoverlapping</a></li><li><a href="#method.drop_in_place" title="drop_in_place">drop_in_place</a></li><li><a href="#method.from_mut" title="from_mut">from_mut</a></li><li><a href="#method.from_mut_slice" title="from_mut_slice">from_mut_slice</a></li><li><a href="#method.from_ref" title="from_ref">from_ref</a></li><li><a href="#method.from_slice" title="from_slice">from_slice</a></li><li><a href="#method.from_slice_mut" title="from_slice_mut">from_slice_mut</a></li><li><a href="#method.is_null" title="is_null">is_null</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.new_unchecked" title="new_unchecked">new_unchecked</a></li><li><a href="#method.offset" title="offset">offset</a></li><li><a href="#method.offset_from" title="offset_from">offset_from</a></li><li><a href="#method.pointer" title="pointer">pointer</a></li><li><a href="#method.pointer-1" title="pointer">pointer</a></li><li><a href="#method.raw_parts" title="raw_parts">raw_parts</a></li><li><a href="#method.read" title="read">read</a></li><li><a href="#method.read_unaligned" title="read_unaligned">read_unaligned</a></li><li><a href="#method.read_volatile" title="read_volatile">read_volatile</a></li><li><a href="#method.replace" title="replace">replace</a></li><li><a href="#method.sub" title="sub">sub</a></li><li><a href="#method.swap" title="swap">swap</a></li><li><a href="#method.to_const" title="to_const">to_const</a></li><li><a href="#method.to_mut" title="to_mut">to_mut</a></li><li><a href="#method.to_raw_parts" title="to_raw_parts">to_raw_parts</a></li><li><a href="#method.wrapping_add" title="wrapping_add">wrapping_add</a></li><li><a href="#method.wrapping_offset" title="wrapping_offset">wrapping_offset</a></li><li><a href="#method.wrapping_sub" title="wrapping_sub">wrapping_sub</a></li><li><a href="#method.write" title="write">write</a></li><li><a href="#method.write_unaligned" title="write_unaligned">write_unaligned</a></li><li><a href="#method.write_volatile" title="write_volatile">write_volatile</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-BitPtr%3CM,+T,+O%3E" title="Clone">Clone</a></li><li><a href="#impl-Copy-for-BitPtr%3CM,+T,+O%3E" title="Copy">Copy</a></li><li><a href="#impl-Debug-for-BitPtr%3CM,+T,+O%3E" title="Debug">Debug</a></li><li><a href="#impl-Eq-for-BitPtr%3CM,+T,+O%3E" title="Eq">Eq</a></li><li><a href="#impl-From%3C%26T%3E-for-BitPtr%3CConst,+T,+O%3E" title="From&#60;&#38;T&#62;">From&#60;&#38;T&#62;</a></li><li><a href="#impl-From%3C%26mut+T%3E-for-BitPtr%3CMut,+T,+O%3E" title="From&#60;&#38;mut T&#62;">From&#60;&#38;mut T&#62;</a></li><li><a href="#impl-Hash-for-BitPtr%3CM,+T,+O%3E" title="Hash">Hash</a></li><li><a href="#impl-Ord-for-BitPtr%3CM,+T,+O%3E" title="Ord">Ord</a></li><li><a href="#impl-PartialEq%3CBitPtr%3CM2,+T2,+O%3E%3E-for-BitPtr%3CM1,+T1,+O%3E" title="PartialEq&#60;BitPtr&#60;M2, T2, O&#62;&#62;">PartialEq&#60;BitPtr&#60;M2, T2, O&#62;&#62;</a></li><li><a href="#impl-PartialOrd%3CBitPtr%3CM2,+T2,+O%3E%3E-for-BitPtr%3CM1,+T1,+O%3E" title="PartialOrd&#60;BitPtr&#60;M2, T2, O&#62;&#62;">PartialOrd&#60;BitPtr&#60;M2, T2, O&#62;&#62;</a></li><li><a href="#impl-Pointer-for-BitPtr%3CM,+T,+O%3E" title="Pointer">Pointer</a></li><li><a href="#impl-RangeBounds%3CBitPtr%3CM,+T,+O%3E%3E-for-BitPtrRange%3CM,+T,+O%3E" title="RangeBounds&#60;BitPtr&#60;M, T, O&#62;&#62;">RangeBounds&#60;BitPtr&#60;M, T, O&#62;&#62;</a></li><li><a href="#impl-TryFrom%3C*const+T%3E-for-BitPtr%3CConst,+T,+O%3E" title="TryFrom&#60;*const T&#62;">TryFrom&#60;*const T&#62;</a></li><li><a href="#impl-TryFrom%3C*mut+T%3E-for-BitPtr%3CMut,+T,+O%3E" title="TryFrom&#60;*mut T&#62;">TryFrom&#60;*mut T&#62;</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Send-for-BitPtr%3CM,+T,+O%3E" title="!Send">!Send</a></li><li><a href="#impl-Sync-for-BitPtr%3CM,+T,+O%3E" title="!Sync">!Sync</a></li><li><a href="#impl-Freeze-for-BitPtr%3CM,+T,+O%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-BitPtr%3CM,+T,+O%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-BitPtr%3CM,+T,+O%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-BitPtr%3CM,+T,+O%3E" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Any-for-T-1" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-CloneAny-for-T" title="CloneAny">CloneAny</a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-Comparable%3CK%3E-for-Q" title="Comparable&#60;K&#62;">Comparable&#60;K&#62;</a></li><li><a href="#impl-Conv-for-T" title="Conv">Conv</a></li><li><a href="#impl-Equivalent%3CK%3E-for-Q" title="Equivalent&#60;K&#62;">Equivalent&#60;K&#62;</a></li><li><a href="#impl-Equivalent%3CK%3E-for-Q-1" title="Equivalent&#60;K&#62;">Equivalent&#60;K&#62;</a></li><li><a href="#impl-FmtForward-for-T" title="FmtForward">FmtForward</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-NodeTrait-for-N" title="NodeTrait">NodeTrait</a></li><li><a href="#impl-Pipe-for-T" title="Pipe">Pipe</a></li><li><a href="#impl-Tap-for-T" title="Tap">Tap</a></li><li><a href="#impl-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-TryConv-for-T" title="TryConv">TryConv</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>base::<wbr>bit_<wbr>vec::<wbr>prelude</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">common_base</a>::<wbr><a href="../index.html">bit_vec</a>::<wbr><a href="index.html">prelude</a></div><h1>Struct <span class="struct">BitPtr</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code><div class="code-attribute">#[repr(C, packed(1))]</div>pub struct BitPtr&lt;M = Const, T = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, O = <a class="struct" href="struct.LocalBits.html" title="struct common_base::bit_vec::prelude::LocalBits">Lsb0</a>&gt;<div class="where">where
M: Mutability,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div>{
ptr: Address&lt;M, T&gt;,
bit: BitIdx&lt;&lt;T as <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>&gt;::<a class="associatedtype" href="trait.BitStore.html#associatedtype.Mem" title="type common_base::bit_vec::prelude::BitStore::Mem">Mem</a>&gt;,
_or: <a class="struct" href="https://doc.rust-lang.org/nightly/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;,
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="single-bit-pointer"><a class="doc-anchor" href="#single-bit-pointer">§</a>Single-Bit Pointer</h2>
<p>This structure defines a pointer to exactly one bit in a memory element. It is a
structure, rather than an encoding of a <code>*Bit</code> raw pointer, because it contains
more information than can be packed into such a pointer. Furthermore, it can
uphold the same requirements and guarantees that the rest of the crate demands,
whereäs a raw pointer cannot.</p>
<h3 id="original"><a class="doc-anchor" href="#original">§</a>Original</h3>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html"><code>*bool</code></a> and
<a href="https://doc.rust-lang.org/nightly/core/ptr/non_null/struct.NonNull.html" title="struct core::ptr::non_null::NonNull"><code>NonNull&lt;bool&gt;</code></a></p>
<h3 id="api-differences"><a class="doc-anchor" href="#api-differences">§</a>API Differences</h3>
<p>Since raw pointers are not sufficient in space or guarantees, and are limited by
not being marked <code>#[fundamental]</code>, this is an ordinary <code>struct</code>. Because it
cannot use the <code>*const</code>/<code>*mut</code> distinction that raw pointers and references can,
this encodes mutability in a type parameter instead.</p>
<p>In order to be consistent with the rest of the crate, particularly the
<code>*BitSlice</code> encoding, this enforces that all <code>T</code> element addresses are
well-aligned to <code>T</code> and non-null. While this type is used in the API as an
analogue of raw pointers, it is restricted in value to only contain the values
of valid <em>references</em> to memory, not arbitrary pointers.</p>
<h3 id="abi-differences"><a class="doc-anchor" href="#abi-differences">§</a>ABI Differences</h3>
<p>This is aligned to <code>1</code>, rather than the processor word, in order to enable some
crate-internal space optimizations.</p>
<h3 id="type-parameters"><a class="doc-anchor" href="#type-parameters">§</a>Type Parameters</h3>
<ul>
<li><code>M</code>: Marks whether the pointer has mutability permissions to the referent
memory. Only <code>Mut</code> pointers can be used to create <code>&amp;mut</code> references.</li>
<li><code>T</code>: A memory type used to select both the register width and the bus behavior
when performing memory accesses.</li>
<li><code>O</code>: The ordering of bits within a memory element.</li>
</ul>
<h3 id="usage"><a class="doc-anchor" href="#usage">§</a>Usage</h3>
<p>This structure is used as the <code>bitvec</code> equivalent to <code>*bool</code>. It is used in all
raw-pointer APIs and provides behavior to emulate raw pointers. It cannot be
directly dereferenced, as it is not a pointer; it can only be transformed back
into higher referential types, or used in functions that accept it.</p>
<p>These pointers can never be null or misaligned.</p>
<h3 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h3>
<p>Rust and LLVM <strong>do not</strong> have a concept of bit-level initialization yet.
Furthermore, the underlying foundational code that this type uses to manipulate
individual bits in memory relies on construction of <strong>shared references</strong> to
memory, which means that unlike standard pointers, the <code>T</code> element to which
<code>BitPtr</code> values point must always be <strong>already initialized</strong> in your program
context.</p>
<p><code>bitvec</code> is not able to detect or enforce this requirement, and is currently not
able to avoid it. See <a href="crate::access::BitAccess"><code>BitAccess</code></a> for more information.</p>
</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.ptr" class="structfield section-header"><a href="#structfield.ptr" class="anchor field">§</a><code>ptr: Address&lt;M, T&gt;</code></span><span id="structfield.bit" class="structfield section-header"><a href="#structfield.bit" class="anchor field">§</a><code>bit: BitIdx&lt;&lt;T as <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>&gt;::<a class="associatedtype" href="trait.BitStore.html#associatedtype.Mem" title="type common_base::bit_vec::prelude::BitStore::Mem">Mem</a>&gt;</code></span><span id="structfield._or" class="structfield section-header"><a href="#structfield._or" class="anchor field">§</a><code>_or: <a class="struct" href="https://doc.rust-lang.org/nightly/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;</code></span><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: Mutability,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.DANGLING" class="associatedconstant"><h4 class="code-header">pub const <a href="#associatedconstant.DANGLING" class="constant">DANGLING</a>: <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;</h4></section></summary><div class="docblock"><p>The canonical dangling pointer. This selects the starting bit of the
canonical dangling pointer for <code>T</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(
ptr: Address&lt;M, T&gt;,
bit: BitIdx&lt;&lt;T as <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>&gt;::<a class="associatedtype" href="trait.BitStore.html#associatedtype.Mem" title="type common_base::bit_vec::prelude::BitStore::Mem">Mem</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;, MisalignError&lt;T&gt;&gt;</h4></section></summary><div class="docblock"><p>Tries to construct a <code>BitPtr</code> from a memory location and a bit index.</p>
<h6 id="parameters"><a class="doc-anchor" href="#parameters">§</a>Parameters</h6>
<ul>
<li><code>ptr</code>: The address of a memory element. <code>Address</code> wraps raw pointers
or references, and enforces that they are not null. <code>BitPtr</code>
additionally requires that the address be well-aligned to its type;
misaligned addresses cause this to return an error.</li>
<li><code>bit</code>: The index of the selected bit within <code>*ptr</code>.</li>
</ul>
<h6 id="returns"><a class="doc-anchor" href="#returns">§</a>Returns</h6>
<p>This returns an error if <code>ptr</code> is not aligned to <code>T</code>; otherwise, it
returns a new bit-pointer structure to the given element and bit.</p>
<p>You should typically prefer to use constructors that take directly from
a memory reference or pointer, such as the <code>TryFrom&lt;*T&gt;</code>
implementations, the <code>From&lt;&amp;/mut T&gt;</code> implementations, or the
<a href="struct.BitPtr.html#method.from_ref" title="associated function common_base::bit_vec::prelude::BitPtr::from_ref"><code>::from_ref()</code></a>, <a href="struct.BitPtr.html#method.from_mut" title="associated function common_base::bit_vec::prelude::BitPtr::from_mut"><code>::from_mut()</code></a>, <a href="struct.BitPtr.html#method.from_slice" title="associated function common_base::bit_vec::prelude::BitPtr::from_slice"><code>::from_slice()</code></a>, or
<a href="struct.BitPtr.html#method.from_slice_mut" title="associated function common_base::bit_vec::prelude::BitPtr::from_slice_mut"><code>::from_slice_mut()</code></a> functions.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.new_unchecked" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.new_unchecked" class="fn">new_unchecked</a>(
ptr: Address&lt;M, T&gt;,
bit: BitIdx&lt;&lt;T as <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>&gt;::<a class="associatedtype" href="trait.BitStore.html#associatedtype.Mem" title="type common_base::bit_vec::prelude::BitStore::Mem">Mem</a>&gt;,
) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;</h4></section></summary><div class="docblock"><p>Constructs a <code>BitPtr</code> from an address and head index, without checking
the address for validity.</p>
<h6 id="parameters-1"><a class="doc-anchor" href="#parameters-1">§</a>Parameters</h6>
<ul>
<li><code>addr</code>: The memory address to use in the bit-pointer. See the Safety
section.</li>
<li><code>head</code>: The index of the bit in <code>*addr</code> that this bit-pointer selects.</li>
</ul>
<h6 id="returns-1"><a class="doc-anchor" href="#returns-1">§</a>Returns</h6>
<p>A new bit-pointer composed of the parameters. No validity checking is
performed.</p>
<h6 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h6>
<p>The <code>Address</code> type imposes a non-null requirement. <code>BitPtr</code> additionally
requires that <code>addr</code> is well-aligned for <code>T</code>, and presumes that the
caller has ensured this with <a href="crate::ptr::check_alignment."><code>bv_ptr::check_alignment</code></a>. If this is
not the case, then the program is incorrect, and subsequent behavior is
not specified.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.address" class="method"><h4 class="code-header">pub fn <a href="#method.address" class="fn">address</a>(self) -&gt; Address&lt;M, T&gt;</h4></section></summary><div class="docblock"><p>Gets the address of the base storage element.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.bit" class="method"><h4 class="code-header">pub fn <a href="#method.bit" class="fn">bit</a>(self) -&gt; BitIdx&lt;&lt;T as <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>&gt;::<a class="associatedtype" href="trait.BitStore.html#associatedtype.Mem" title="type common_base::bit_vec::prelude::BitStore::Mem">Mem</a>&gt;</h4></section></summary><div class="docblock"><p>Gets the <code>BitIdx</code> that selects the bit within the memory element.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.raw_parts" class="method"><h4 class="code-header">pub fn <a href="#method.raw_parts" class="fn">raw_parts</a>(self) -&gt; (Address&lt;M, T&gt;, BitIdx&lt;&lt;T as <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>&gt;::<a class="associatedtype" href="trait.BitStore.html#associatedtype.Mem" title="type common_base::bit_vec::prelude::BitStore::Mem">Mem</a>&gt;)</h4></section></summary><div class="docblock"><p>Decomposes a bit-pointer into its element address and bit index.</p>
<h6 id="parameters-2"><a class="doc-anchor" href="#parameters-2">§</a>Parameters</h6>
<ul>
<li><code>self</code></li>
</ul>
<h6 id="returns-2"><a class="doc-anchor" href="#returns-2">§</a>Returns</h6>
<ul>
<li><code>.0</code>: The memory address in which the referent bit is located.</li>
<li><code>.1</code>: The index of the referent bit in <code>*.0</code> according to the <code>O</code> type
parameter.</li>
</ul>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_const" class="method"><h4 class="code-header">pub fn <a href="#method.to_const" class="fn">to_const</a>(self) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T, O&gt;</h4></section></summary><div class="docblock"><p>Removes write permissions from a bit-pointer.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_mut" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.to_mut" class="fn">to_mut</a>(self) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt;</h4></section></summary><div class="docblock"><p>Adds write permissions to a bit-pointer.</p>
<h6 id="safety-2"><a class="doc-anchor" href="#safety-2">§</a>Safety</h6>
<p>This pointer must have been derived from a <code>*mut</code> pointer.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitPtr%3CConst,+T,+O%3E" class="impl"><a href="#impl-BitPtr%3CConst,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_ref" class="method"><h4 class="code-header">pub fn <a href="#method.from_ref" class="fn">from_ref</a>(elem: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T, O&gt;</h4></section></summary><div class="docblock"><p>Constructs a <code>BitPtr</code> to the zeroth bit in a single element.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_slice" class="method"><h4 class="code-header">pub fn <a href="#method.from_slice" class="fn">from_slice</a>(slice: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T, O&gt;</h4></section></summary><div class="docblock"><p>Constructs a <code>BitPtr</code> to the zeroth bit in the zeroth element of a
slice.</p>
<p>This method is distinct from <code>Self::from_ref(&amp;elem[0])</code>, because it
ensures that the returned bit-pointer has provenance over the entire
slice. Indexing within a slice narrows the provenance range, and makes
departure from the subslice, <em>even within the original slice</em>, illegal.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.pointer" class="method"><h4 class="code-header">pub fn <a href="#method.pointer" class="fn">pointer</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const T</a></h4></section></summary><div class="docblock"><p>Gets a raw pointer to the memory element containing the selected bit.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitPtr%3CMut,+T,+O%3E" class="impl"><a href="#impl-BitPtr%3CMut,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_mut" class="method"><h4 class="code-header">pub fn <a href="#method.from_mut" class="fn">from_mut</a>(elem: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt;</h4></section></summary><div class="docblock"><p>Constructs a mutable <code>BitPtr</code> to the zeroth bit in a single element.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_mut_slice" class="method"><h4 class="code-header">pub fn <a href="#method.from_mut_slice" class="fn">from_mut_slice</a>(slice: &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt;</h4></section></summary><div class="docblock"><p>Constructs a <code>BitPtr</code> to the zeroth bit in the zeroth element of a
mutable slice.</p>
<p>This method is distinct from <code>Self::from_mut(&amp;mut elem[0])</code>, because it
ensures that the returned bit-pointer has provenance over the entire
slice. Indexing within a slice narrows the provenance range, and makes
departure from the subslice, <em>even within the original slice</em>, illegal.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_slice_mut" class="method"><h4 class="code-header">pub fn <a href="#method.from_slice_mut" class="fn">from_slice_mut</a>(slice: &amp;mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt;</h4></section></summary><div class="docblock"><p>Constructs a mutable <code>BitPtr</code> to the zeroth bit in the zeroth element of
a slice.</p>
<p>This method is distinct from <code>Self::from_mut(&amp;mut elem[0])</code>, because it
ensures that the returned bit-pointer has provenance over the entire
slice. Indexing within a slice narrows the provenance range, and makes
departure from the subslice, <em>even within the original slice</em>, illegal.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.pointer-1" class="method"><h4 class="code-header">pub fn <a href="#method.pointer-1" class="fn">pointer</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut T</a></h4></section></summary><div class="docblock"><p>Gets a raw pointer to the memory location containing the selected bit.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitPtr%3CM,+T,+O%3E-1" class="impl"><a href="#impl-BitPtr%3CM,+T,+O%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: Mutability,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3><div class="docblock"><p>Port of the <code>*bool</code> inherent API.</p>
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.is_null" class="method"><h4 class="code-header">pub fn <a href="#method.is_null" class="fn">is_null</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: <code>BitPtr</code> is never null</span></div></span></summary><div class="docblock"><p>Tests if a bit-pointer is the null value.</p>
<p>This is always false, as a <code>BitPtr</code> is a <code>NonNull</code> internally. Use
<code>Option&lt;BitPtr&gt;</code> to express the potential for a null pointer.</p>
<h6 id="original-1"><a class="doc-anchor" href="#original-1">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.is_null"><code>pointer::is_null</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cast" class="method"><h4 class="code-header">pub fn <a href="#method.cast" class="fn">cast</a>&lt;U&gt;(self) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, U, O&gt;<div class="where">where
U: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,</div></h4></section></summary><div class="docblock"><p>Casts to a <code>BitPtr</code> with a different storage parameter.</p>
<p>This is not free! In order to maintain value integrity, it encodes a
<code>BitSpan</code> encoded descriptor with its value, casts that, then decodes
into a <code>BitPtr</code> of the target type. If <code>T</code> and <code>U</code> have different
<code>::Mem</code> associated types, then this may change the selected bit in
memory. This is an unavoidable cost of the addressing and encoding
schemes.</p>
<h6 id="original-2"><a class="doc-anchor" href="#original-2">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.cast"><code>pointer::cast</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_raw_parts" class="method"><h4 class="code-header">pub fn <a href="#method.to_raw_parts" class="fn">to_raw_parts</a>(self) -&gt; (Address&lt;M, T&gt;, BitIdx&lt;&lt;T as <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>&gt;::<a class="associatedtype" href="trait.BitStore.html#associatedtype.Mem" title="type common_base::bit_vec::prelude::BitStore::Mem">Mem</a>&gt;)</h4></section></summary><div class="docblock"><p>Decomposes a bit-pointer into its address and head-index components.</p>
<h6 id="original-3"><a class="doc-anchor" href="#original-3">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.to_raw_parts"><code>pointer::to_raw_parts</code></a></p>
<h6 id="api-differences-1"><a class="doc-anchor" href="#api-differences-1">§</a>API Differences</h6>
<p>The original method is unstable as of 1.54.0; however, because <code>BitPtr</code>
already has a similar API, the name is optimistically stabilized here.
Prefer <a href="struct.BitPtr.html#method.raw_parts" title="method common_base::bit_vec::prelude::BitPtr::raw_parts"><code>.raw_parts()</code></a> until the original inherent stabilizes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.as_ref" class="fn">as_ref</a>&lt;'a&gt;(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.BitRef.html" title="struct common_base::bit_vec::prelude::BitRef">BitRef</a>&lt;'a, Const, T, O&gt;&gt;</h4></section></summary><div class="docblock"><p>Produces a proxy reference to the referent bit.</p>
<p>Because <code>BitPtr</code> guarantees that it is non-null and well-aligned, this
never returns <code>None</code>. However, this is still unsafe to call on any
bit-pointers created from conjured values rather than known references.</p>
<h6 id="original-4"><a class="doc-anchor" href="#original-4">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.as_ref"><code>pointer::as_ref</code></a></p>
<h6 id="api-differences-2"><a class="doc-anchor" href="#api-differences-2">§</a>API Differences</h6>
<p>This produces a proxy type rather than a true reference. The proxy
implements <code>Deref&lt;Target = bool&gt;</code>, and can be converted to <code>&amp;bool</code> with
a reborrow <code>&amp;*</code>.</p>
<h6 id="safety-3"><a class="doc-anchor" href="#safety-3">§</a>Safety</h6>
<p>Since <code>BitPtr</code> does not permit null or misaligned pointers, this method
will always dereference the pointer in order to create the proxy. As
such, you must ensure the following conditions are met:</p>
<ul>
<li>the pointer must be dereferenceable as defined in the standard library
documentation</li>
<li>the pointer must point to an initialized instance of <code>T</code></li>
<li>you must ensure that no other pointer will race to modify the referent
location while this call is reading from memory to produce the proxy</li>
</ul>
<h6 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h6>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bitvec::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>data = <span class="number">1u8</span>;
<span class="kw">let </span>ptr = BitPtr::&lt;<span class="kw">_</span>, <span class="kw">_</span>, Lsb0&gt;::from_ref(<span class="kw-2">&amp;</span>data);
<span class="kw">let </span>val = <span class="kw">unsafe </span>{ ptr.as_ref() }.unwrap();
<span class="macro">assert!</span>(<span class="kw-2">*</span>val);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.offset" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.offset" class="fn">offset</a>(self, count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;</h4></section></summary><div class="docblock"><p>Creates a new bit-pointer at a specified offset from the original.</p>
<p><code>count</code> is in units of bits.</p>
<h6 id="original-5"><a class="doc-anchor" href="#original-5">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.offset"><code>pointer::offset</code></a></p>
<h6 id="safety-4"><a class="doc-anchor" href="#safety-4">§</a>Safety</h6>
<p><code>BitPtr</code> is implemented with Rust raw pointers internally, and is
subject to all of Rusts rules about provenance and permission tracking.
You must abide by the safety rules established in the original method,
to which this internally delegates.</p>
<p>Additionally, <code>bitvec</code> imposes its own rules: while Rust cannot observe
provenance beyond an element or byte level, <code>bitvec</code> demands that
<code>&amp;mut BitSlice</code> have exclusive view over all bits it observes. You must
not produce a bit-pointer that departs a <code>BitSlice</code> region and intrudes
on any <code>&amp;mut BitSlice</code>s handle, and you must not produce a
write-capable bit-pointer that intrudes on a <code>&amp;BitSlice</code> handle that
expects its contents to be immutable.</p>
<p>Note that it is illegal to <em>construct</em> a bit-pointer that invalidates
any of these rules. If you wish to defer safety-checking to the point of
dereferencing, and allow the temporary construction <em>but not</em>
<em>dereference</em> of illegal <code>BitPtr</code>s, use <a href="struct.BitPtr.html#method.wrapping_offset" title="method common_base::bit_vec::prelude::BitPtr::wrapping_offset"><code>.wrapping_offset()</code></a> instead.</p>
<h6 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h6>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bitvec::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>data = <span class="number">5u8</span>;
<span class="kw">let </span>ptr = BitPtr::&lt;<span class="kw">_</span>, <span class="kw">_</span>, Lsb0&gt;::from_ref(<span class="kw-2">&amp;</span>data);
<span class="kw">unsafe </span>{
<span class="macro">assert!</span>(ptr.read());
<span class="macro">assert!</span>(!ptr.offset(<span class="number">1</span>).read());
<span class="macro">assert!</span>(ptr.offset(<span class="number">2</span>).read());
}</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.wrapping_offset" class="method"><h4 class="code-header">pub fn <a href="#method.wrapping_offset" class="fn">wrapping_offset</a>(self, count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;</h4></section></summary><div class="docblock"><p>Creates a new bit-pointer at a specified offset from the original.</p>
<p><code>count</code> is in units of bits.</p>
<h6 id="original-6"><a class="doc-anchor" href="#original-6">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset"><code>pointer::wrapping_offset</code></a></p>
<h6 id="api-differences-3"><a class="doc-anchor" href="#api-differences-3">§</a>API Differences</h6>
<p><code>bitvec</code> makes it explicitly illegal to wrap a pointer around the high
end of the address space, because it is incapable of representing a null
pointer.</p>
<p>However, <code>&lt;*T&gt;::wrapping_offset</code> has additional properties as a result
of its tolerance for wrapping the address space: it tolerates departing
a provenance region, and is not unsafe to use to <em>create</em> a bit-pointer
that is outside the bounds of its original provenance.</p>
<h6 id="safety-5"><a class="doc-anchor" href="#safety-5">§</a>Safety</h6>
<p>This function is safe to use because the bit-pointers it creates defer
their provenance checks until the point of dereference. As such, you
can safely use this to perform arbitrary pointer arithmetic that Rust
considers illegal in ordinary arithmetic, as long as you do not
dereference the bit-pointer until it has been brought in bounds of the
originating provenance region.</p>
<p>This means that, to the Rust rule engine,
<code>let z = x.wrapping_add(y as usize).wrapping_sub(x as usize);</code> is not
equivalent to <code>y</code>, but <code>z</code> is safe to construct, and
<code>z.wrapping_add(x as usize).wrapping_sub(y as usize)</code> produces a
bit-pointer that <em>is</em> equivalent to <code>x</code>.</p>
<p>See the documentation of the original method for more details about
provenance regions, and the distinctions that the optimizer makes about
them.</p>
<h6 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h6>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bitvec::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>data = <span class="number">0u32</span>;
<span class="kw">let </span><span class="kw-2">mut </span>ptr = BitPtr::&lt;<span class="kw">_</span>, <span class="kw">_</span>, Lsb0&gt;::from_ref(<span class="kw-2">&amp;</span>data);
<span class="kw">let </span>end = ptr.wrapping_offset(<span class="number">32</span>);
<span class="kw">while </span>ptr &lt; end {
<span class="macro">println!</span>(<span class="string">"{}"</span>, <span class="kw">unsafe </span>{ ptr.read() });
ptr = ptr.wrapping_offset(<span class="number">3</span>);
}</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.offset_from" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.offset_from" class="fn">offset_from</a>&lt;U&gt;(self, origin: <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, U, O&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a><div class="where">where
U: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>&lt;Mem = &lt;T as <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>&gt;::<a class="associatedtype" href="trait.BitStore.html#associatedtype.Mem" title="type common_base::bit_vec::prelude::BitStore::Mem">Mem</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Calculates the distance (in bits) between two bit-pointers.</p>
<p>This method is the inverse of <a href="struct.BitPtr.html#method.offset" title="method common_base::bit_vec::prelude::BitPtr::offset"><code>.offset()</code></a>.</p>
<h6 id="original-7"><a class="doc-anchor" href="#original-7">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.offset_from"><code>pointer::offset_from</code></a></p>
<h6 id="api-differences-4"><a class="doc-anchor" href="#api-differences-4">§</a>API Differences</h6>
<p>The base pointer may have a different <code>BitStore</code> type parameter, as long
as they share an underlying memory type. This is necessary in order to
accommodate aliasing markers introduced between when an origin pointer
was taken and when <code>self</code> compared against it.</p>
<h6 id="safety-6"><a class="doc-anchor" href="#safety-6">§</a>Safety</h6>
<p>Both <code>self</code> and <code>origin</code> <strong>must</strong> be drawn from the same provenance
region. This means that they must be created from the same Rust
allocation, whether with <code>let</code> or the allocator API, and must be in the
(inclusive) range <code>base ..= base + len</code>. The first bit past the end of
a region can be addressed, just not dereferenced.</p>
<p>See the original <code>&lt;*T&gt;::offset_from</code> for more details on region safety.</p>
<h6 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h6>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bitvec::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>data = <span class="number">0u32</span>;
<span class="kw">let </span>base = BitPtr::&lt;<span class="kw">_</span>, <span class="kw">_</span>, Lsb0&gt;::from_ref(<span class="kw-2">&amp;</span>data);
<span class="kw">let </span>low = <span class="kw">unsafe </span>{ base.add(<span class="number">10</span>) };
<span class="kw">let </span>high = <span class="kw">unsafe </span>{ low.add(<span class="number">15</span>) };
<span class="kw">unsafe </span>{
<span class="macro">assert_eq!</span>(high.offset_from(low), <span class="number">15</span>);
<span class="macro">assert_eq!</span>(low.offset_from(high), -<span class="number">15</span>);
<span class="macro">assert_eq!</span>(low.offset(<span class="number">15</span>), high);
<span class="macro">assert_eq!</span>(high.offset(-<span class="number">15</span>), low);
}</code></pre></div>
<p>While this method is safe to <em>construct</em> bit-pointers that depart a
provenance region, it remains illegal to <em>dereference</em> those pointers!</p>
<p>This usage is incorrect, and a program that contains it is not
well-formed.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bitvec::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>a = <span class="number">0u8</span>;
<span class="kw">let </span>b = !<span class="number">0u8</span>;
<span class="kw">let </span>a_ptr = BitPtr::&lt;<span class="kw">_</span>, <span class="kw">_</span>, Lsb0&gt;::from_ref(<span class="kw-2">&amp;</span>a);
<span class="kw">let </span>b_ptr = BitPtr::&lt;<span class="kw">_</span>, <span class="kw">_</span>, Lsb0&gt;::from_ref(<span class="kw-2">&amp;</span>b);
<span class="kw">let </span>diff = (b_ptr.pointer() <span class="kw">as </span>isize)
.wrapping_sub(a_ptr.pointer() <span class="kw">as </span>isize)
<span class="comment">// Remember: raw pointers are byte-stepped,
// but bit-pointers are bit-stepped.
</span>.wrapping_mul(<span class="number">8</span>);
<span class="comment">// This pointer to `b` has `a`s provenance:
</span><span class="kw">let </span>b_ptr_2 = a_ptr.wrapping_offset(diff);
<span class="comment">// They are *arithmetically* equal:
</span><span class="macro">assert_eq!</span>(b_ptr, b_ptr_2);
<span class="comment">// But it is still undefined behavior to cross provenances!
</span><span class="macro">assert_eq!</span>(<span class="number">0</span>, <span class="kw">unsafe </span>{ b_ptr_2.offset_from(b_ptr) });</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.add" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.add" class="fn">add</a>(self, count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;</h4></section></summary><div class="docblock"><p>Adjusts a bit-pointer upwards in memory. This is equivalent to
<code>.offset(count as isize)</code>.</p>
<p><code>count</code> is in units of bits.</p>
<h6 id="original-8"><a class="doc-anchor" href="#original-8">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.add"><code>pointer::add</code></a></p>
<h6 id="safety-7"><a class="doc-anchor" href="#safety-7">§</a>Safety</h6>
<p>See <a href="struct.BitPtr.html#method.offset" title="method common_base::bit_vec::prelude::BitPtr::offset"><code>.offset()</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.sub" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.sub" class="fn">sub</a>(self, count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;</h4></section></summary><div class="docblock"><p>Adjusts a bit-pointer downwards in memory. This is equivalent to
<code>.offset((count as isize).wrapping_neg())</code>.</p>
<p><code>count</code> is in units of bits.</p>
<h6 id="original-9"><a class="doc-anchor" href="#original-9">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.sub"><code>pointer::sub</code></a></p>
<h6 id="safety-8"><a class="doc-anchor" href="#safety-8">§</a>Safety</h6>
<p>See <a href="struct.BitPtr.html#method.offset" title="method common_base::bit_vec::prelude::BitPtr::offset"><code>.offset()</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.wrapping_add" class="method"><h4 class="code-header">pub fn <a href="#method.wrapping_add" class="fn">wrapping_add</a>(self, count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;</h4></section></summary><div class="docblock"><p>Adjusts a bit-pointer upwards in memory, using wrapping semantics. This
is equivalent to <code>.wrapping_offset(count as isize)</code>.</p>
<p><code>count</code> is in units of bits.</p>
<h6 id="original-10"><a class="doc-anchor" href="#original-10">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_add"><code>pointer::wrapping_add</code></a></p>
<h6 id="safety-9"><a class="doc-anchor" href="#safety-9">§</a>Safety</h6>
<p>See <a href="struct.BitPtr.html#method.wrapping_offset" title="method common_base::bit_vec::prelude::BitPtr::wrapping_offset"><code>.wrapping_offset()</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.wrapping_sub" class="method"><h4 class="code-header">pub fn <a href="#method.wrapping_sub" class="fn">wrapping_sub</a>(self, count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;</h4></section></summary><div class="docblock"><p>Adjusts a bit-pointer downwards in memory, using wrapping semantics.
This is equivalent to
<code>.wrapping_offset((count as isize).wrapping_neg())</code>.</p>
<p><code>count</code> is in units of bits.</p>
<h6 id="original-11"><a class="doc-anchor" href="#original-11">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_add"><code>pointer::wrapping_add</code></a></p>
<h6 id="safety-10"><a class="doc-anchor" href="#safety-10">§</a>Safety</h6>
<p>See <a href="struct.BitPtr.html#method.wrapping_offset" title="method common_base::bit_vec::prelude::BitPtr::wrapping_offset"><code>.wrapping_offset()</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.read" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.read" class="fn">read</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Reads the bit from <code>*self</code>.</p>
<h6 id="original-12"><a class="doc-anchor" href="#original-12">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.read"><code>pointer::read</code></a></p>
<h6 id="safety-11"><a class="doc-anchor" href="#safety-11">§</a>Safety</h6>
<p>See <a href="crate::ptr::read"><code>ptr::read</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_volatile" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.read_volatile" class="fn">read_volatile</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Reads the bit from <code>*self</code> using a volatile load.</p>
<p>Prefer using a crate such as <a href="https://docs.rs/voladdress/later/voladdress"><code>voladdress</code></a> to manage volatile I/O
and use <code>bitvec</code> only on the local objects it provides. Individual I/O
operations for individual bits are likely not the behavior you want.</p>
<h6 id="original-13"><a class="doc-anchor" href="#original-13">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.read_volatile"><code>pointer::read_volatile</code></a></p>
<h6 id="safety-12"><a class="doc-anchor" href="#safety-12">§</a>Safety</h6>
<p>See <a href="crate::ptr::read_volatile"><code>ptr::read_volatile</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_unaligned" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.read_unaligned" class="fn">read_unaligned</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: <code>BitPtr</code> does not have unaligned addresses</span></div></span></summary><div class="docblock"><p>Reads the bit from <code>*self</code> using an unaligned memory access.</p>
<p><code>BitPtr</code> forbids unaligned addresses. If you have such an address, you
must perform your memory accesses on the raw element, and only use
<code>bitvec</code> on a well-aligned stack temporary. This method should never be
necessary.</p>
<h6 id="original-14"><a class="doc-anchor" href="#original-14">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.read_unaligned"><code>pointer::read_unaligned</code></a></p>
<h6 id="safety-13"><a class="doc-anchor" href="#safety-13">§</a>Safety</h6>
<p>See <a href="crate::ptr::read_unaligned"><code>ptr::read_unaligned</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_to" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.copy_to" class="fn">copy_to</a>&lt;T2, O2&gt;(self, dest: <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T2, O2&gt;, count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)<div class="where">where
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O2: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h4></section></summary><div class="docblock"><p>Copies <code>count</code> bits from <code>self</code> to <code>dest</code>. The source and destination
may overlap.</p>
<p>Note that overlap is only defined when <code>O</code> and <code>O2</code> are the same type.
If they differ, then <code>bitvec</code> does not define overlap, and assumes that
they are wholly discrete in memory.</p>
<h6 id="original-15"><a class="doc-anchor" href="#original-15">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to"><code>pointer::copy_to</code></a></p>
<h6 id="safety-14"><a class="doc-anchor" href="#safety-14">§</a>Safety</h6>
<p>See <a href="crate::ptr::copy"><code>ptr::copy</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_to_nonoverlapping" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.copy_to_nonoverlapping" class="fn">copy_to_nonoverlapping</a>&lt;T2, O2&gt;(
self,
dest: <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T2, O2&gt;,
count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
)<div class="where">where
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O2: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h4></section></summary><div class="docblock"><p>Copies <code>count</code> bits from <code>self</code> to <code>dest</code>. The source and destination
may <em>not</em> overlap.</p>
<h6 id="original-16"><a class="doc-anchor" href="#original-16">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to_nonoverlapping"><code>pointer::copy_to_nonoverlapping</code></a></p>
<h6 id="safety-15"><a class="doc-anchor" href="#safety-15">§</a>Safety</h6>
<p>See <a href="crate::ptr::copy_nonoverlapping"><code>ptr::copy_nonoverlapping</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.align_offset" class="method"><h4 class="code-header">pub fn <a href="#method.align_offset" class="fn">align_offset</a>(self, align: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Computes the offset (in bits) that needs to be applied to the
bit-pointer in order to make it aligned to the given <em>byte</em> alignment.</p>
<p>“Alignment” here means that the bit-pointer selects the starting bit of
a memory location whose address satisfies the requested alignment.</p>
<p><code>align</code> is measured in <strong>bytes</strong>. If you wish to align your bit-pointer
to a specific fraction (½, ¼, or ⅛ of one byte), please file an issue
and I will work on adding this functionality.</p>
<h6 id="original-17"><a class="doc-anchor" href="#original-17">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.align_offset"><code>pointer::align_offset</code></a></p>
<h6 id="notes"><a class="doc-anchor" href="#notes">§</a>Notes</h6>
<p>If the base-element address of the bit-pointer is already aligned to
<code>align</code>, then this will return the bit-offset required to select the
first bit of the successor element.</p>
<p>If it is not possible to align the bit-pointer, then the implementation
returns <code>usize::MAX</code>.</p>
<p>The return value is measured in bits, not <code>T</code> elements or bytes. The
only thing you can do with it is pass it into <a href="struct.BitPtr.html#method.add" title="method common_base::bit_vec::prelude::BitPtr::add"><code>.add()</code></a> or
<a href="struct.BitPtr.html#method.wrapping_add" title="method common_base::bit_vec::prelude::BitPtr::wrapping_add"><code>.wrapping_add()</code></a>.</p>
<p>Note from the standard library: It is permissible for the implementation
to <em>always</em> return <code>usize::MAX</code>. Only your algorithms performance can
depend on getting a usable offset here; it must be correct independently
of this function providing a useful value.</p>
<h6 id="safety-16"><a class="doc-anchor" href="#safety-16">§</a>Safety</h6>
<p>There are no guarantees whatsoëver that offsetting the bit-pointer will
not overflow or go beyond the allocation that the bit-pointer selects.
It is up to the caller to ensure that the returned offset is correct in
all terms other than alignment.</p>
<h6 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h6>
<p>This method panics if <code>align</code> is not a power of two.</p>
<h6 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h6>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bitvec::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>data = [<span class="number">0u8</span>; <span class="number">3</span>];
<span class="kw">let </span>ptr = BitPtr::&lt;<span class="kw">_</span>, <span class="kw">_</span>, Lsb0&gt;::from_slice(<span class="kw-2">&amp;</span>data);
<span class="kw">let </span>ptr = <span class="kw">unsafe </span>{ ptr.add(<span class="number">2</span>) };
<span class="kw">let </span>count = ptr.align_offset(<span class="number">2</span>);
<span class="macro">assert!</span>(count &gt;= <span class="number">6</span>);</code></pre></div></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitPtr%3CMut,+T,+O%3E-1" class="impl"><a href="#impl-BitPtr%3CMut,+T,+O%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3><div class="docblock"><p>Port of the <code>*mut bool</code> inherent API.</p>
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.as_mut" class="fn">as_mut</a>&lt;'a&gt;(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.BitRef.html" title="struct common_base::bit_vec::prelude::BitRef">BitRef</a>&lt;'a, Mut, T, O&gt;&gt;</h4></section></summary><div class="docblock"><p>Produces a proxy reference to the referent bit.</p>
<p>Because <code>BitPtr</code> guarantees that it is non-null and well-aligned, this
never returns <code>None</code>. However, this is still unsafe to call on any
bit-pointers created from conjured values rather than known references.</p>
<h6 id="original-18"><a class="doc-anchor" href="#original-18">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.as_mut"><code>pointer::as_mut</code></a></p>
<h6 id="api-differences-5"><a class="doc-anchor" href="#api-differences-5">§</a>API Differences</h6>
<p>This produces a proxy type rather than a true reference. The proxy
implements <code>DerefMut&lt;Target = bool&gt;</code>, and can be converted to
<code>&amp;mut bool</code> with a reborrow <code>&amp;mut *</code>.</p>
<p>Writes to the proxy are not reflected in the proxied location until the
proxy is destroyed, either through <code>Drop</code> or its <a href="struct.BitRef.html#method.commit" title="method common_base::bit_vec::prelude::BitRef::commit"><code>.commit()</code></a> method.</p>
<h6 id="safety-17"><a class="doc-anchor" href="#safety-17">§</a>Safety</h6>
<p>Since <code>BitPtr</code> does not permit null or misaligned pointers, this method
will always dereference the pointer in order to create the proxy. As
such, you must ensure the following conditions are met:</p>
<ul>
<li>the pointer must be dereferenceable as defined in the standard library
documentation</li>
<li>the pointer must point to an initialized instance of <code>T</code></li>
<li>you must ensure that no other pointer will race to modify the referent
location while this call is reading from memory to produce the proxy</li>
<li>you must ensure that no other <code>bitvec</code> handle targets the referent bit</li>
</ul>
<h6 id="examples-5"><a class="doc-anchor" href="#examples-5">§</a>Examples</h6>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bitvec::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span><span class="kw-2">mut </span>data = <span class="number">0u8</span>;
<span class="kw">let </span>ptr = BitPtr::&lt;<span class="kw">_</span>, <span class="kw">_</span>, Lsb0&gt;::from_mut(<span class="kw-2">&amp;mut </span>data);
<span class="kw">let </span><span class="kw-2">mut </span>val = <span class="kw">unsafe </span>{ ptr.as_mut() }.unwrap();
<span class="macro">assert!</span>(!<span class="kw-2">*</span>val);
<span class="kw-2">*</span>val = <span class="bool-val">true</span>;
<span class="macro">assert!</span>(<span class="kw-2">*</span>val);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.copy_from" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.copy_from" class="fn">copy_from</a>&lt;T2, O2&gt;(self, src: <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T2, O2&gt;, count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)<div class="where">where
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O2: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h4></section></summary><div class="docblock"><p>Copies <code>count</code> bits from the region starting at <code>src</code> to the region
starting at <code>self</code>.</p>
<p>The regions are free to overlap; the implementation will detect overlap
and correctly avoid it.</p>
<p>Note: this has the <em>opposite</em> argument order from <a href="crate::ptr::copy"><code>ptr::copy</code></a>: <code>self</code>
is the destination, not the source.</p>
<h6 id="original-19"><a class="doc-anchor" href="#original-19">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_from"><code>pointer::copy_from</code></a></p>
<h6 id="safety-18"><a class="doc-anchor" href="#safety-18">§</a>Safety</h6>
<p>See <a href="crate::ptr::copy"><code>ptr::copy</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_from_nonoverlapping" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.copy_from_nonoverlapping" class="fn">copy_from_nonoverlapping</a>&lt;T2, O2&gt;(
self,
src: <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T2, O2&gt;,
count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
)<div class="where">where
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O2: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h4></section></summary><div class="docblock"><p>Copies <code>count</code> bits from the region starting at <code>src</code> to the region
starting at <code>self</code>.</p>
<p>Unlike <a href="struct.BitPtr.html#method.copy_from" title="method common_base::bit_vec::prelude::BitPtr::copy_from"><code>.copy_from()</code></a>, the two regions may <em>not</em> overlap; this method
does not attempt to detect overlap and thus may have a slight
performance boost over the overlap-handling <code>.copy_from()</code>.</p>
<p>Note: this has the <em>opposite</em> argument order from
<a href="https://doc.rust-lang.org/nightly/core/ptr/fn.copy_nonoverlapping.html" title="fn core::ptr::copy_nonoverlapping"><code>ptr::copy_nonoverlapping</code></a>: <code>self</code> is the destination, not the source.</p>
<h6 id="original-20"><a class="doc-anchor" href="#original-20">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_from_nonoverlapping"><code>pointer::copy_from_nonoverlapping</code></a></p>
<h6 id="safety-19"><a class="doc-anchor" href="#safety-19">§</a>Safety</h6>
<p>See <a href="https://doc.rust-lang.org/nightly/core/ptr/fn.copy_nonoverlapping.html" title="fn core::ptr::copy_nonoverlapping"><code>ptr::copy_nonoverlapping</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drop_in_place" class="method"><h4 class="code-header">pub fn <a href="#method.drop_in_place" class="fn">drop_in_place</a>(self)</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: this has no effect, and should not be called</span></div></span></summary><div class="docblock"><p>Runs the destructor of the referent value.</p>
<p><code>bool</code> has no destructor; this function does nothing.</p>
<h6 id="original-21"><a class="doc-anchor" href="#original-21">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.drop_in_place"><code>pointer::drop_in_place</code></a></p>
<h6 id="safety-20"><a class="doc-anchor" href="#safety-20">§</a>Safety</h6>
<p>See <a href="crate::ptr::drop_in_place"><code>ptr::drop_in_place</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.write" class="fn">write</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Writes a new bit into the given location.</p>
<h6 id="original-22"><a class="doc-anchor" href="#original-22">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.write"><code>pointer::write</code></a></p>
<h6 id="safety-21"><a class="doc-anchor" href="#safety-21">§</a>Safety</h6>
<p>See <a href="crate::ptr::write"><code>ptr::write</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_volatile" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.write_volatile" class="fn">write_volatile</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Writes a new bit using volatile I/O operations.</p>
<p>Because processors do not generally have single-bit read or write
instructions, this must perform a volatile read of the entire memory
location, perform the write locally, then perform another volatile write
to the entire location. These three steps are guaranteed to be
sequential with respect to each other, but are not guaranteed to be
atomic.</p>
<p>Volatile operations are intended to act on I/O memory, and are <em>only</em>
guaranteed not to be elided or reördered by the compiler across other
I/O operations.</p>
<p>You should not use <code>bitvec</code> to act on volatile memory. You should use a
crate specialized for volatile I/O work, such as <a href="https://docs.rs/voladdr/latest/voladdr"><code>voladdr</code></a>, and use it
to explicitly manage the I/O and ask it to perform <code>bitvec</code> work only on
the local snapshot of a volatile location.</p>
<h6 id="original-23"><a class="doc-anchor" href="#original-23">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.write_volatile"><code>pointer::write_volatile</code></a></p>
<h6 id="safety-22"><a class="doc-anchor" href="#safety-22">§</a>Safety</h6>
<p>See <a href="crate::ptr::write_volatile"><code>ptr::write_volatile</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_unaligned" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.write_unaligned" class="fn">write_unaligned</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: <code>BitPtr</code> does not have unaligned addresses</span></div></span></summary><div class="docblock"><p>Writes a bit into memory, tolerating unaligned addresses.</p>
<p><code>BitPtr</code> does not have unaligned addresses. <code>BitPtr</code> itself is capable
of operating on misaligned addresses, but elects to disallow use of them
in keeping with the rest of <code>bitvec</code>s requirements.</p>
<h6 id="original-24"><a class="doc-anchor" href="#original-24">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.write_unaligned"><code>pointer::write_unaligned</code></a></p>
<h6 id="safety-23"><a class="doc-anchor" href="#safety-23">§</a>Safety</h6>
<p>See <a href="crate::ptr::write_unaligned"><code>ptr::write_unaligned</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.replace" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.replace" class="fn">replace</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Replaces the bit at <code>*self</code> with a new value, returning the previous
value.</p>
<h6 id="original-25"><a class="doc-anchor" href="#original-25">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.replace"><code>pointer::replace</code></a></p>
<h6 id="safety-24"><a class="doc-anchor" href="#safety-24">§</a>Safety</h6>
<p>See <a href="crate::ptr::replace"><code>ptr::replace</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.swap" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.swap" class="fn">swap</a>&lt;T2, O2&gt;(self, with: <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T2, O2&gt;)<div class="where">where
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O2: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h4></section></summary><div class="docblock"><p>Swaps the bits at two mutable locations.</p>
<h6 id="original-26"><a class="doc-anchor" href="#original-26">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.pointer.html#method.swap"><code>pointer::swap</code></a></p>
<h6 id="safety-25"><a class="doc-anchor" href="#safety-25">§</a>Safety</h6>
<p>See <a href="crate::ptr::swap"><code>ptr::swap</code></a>.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-Clone-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <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="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: Mutability,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;</h4></section></summary><div class='docblock'>Returns a duplicate of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#245-247">Source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: &amp;Self)</h4></section></summary><div class='docblock'>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></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-Debug-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <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="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: Mutability,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, fmt: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>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></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26T%3E-for-BitPtr%3CConst,+T,+O%3E" class="impl"><a href="#impl-From%3C%26T%3E-for-BitPtr%3CConst,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a>&gt; for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(elem: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T, O&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26mut+T%3E-for-BitPtr%3CMut,+T,+O%3E" class="impl"><a href="#impl-From%3C%26mut+T%3E-for-BitPtr%3CMut,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a>&gt; for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(elem: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a>) -&gt; <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Hash-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-Hash-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <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="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: Mutability,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl"><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash" class="fn">hash</a>&lt;H&gt;(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut H</a>)<div class="where">where
H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,</div></h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#235-237">Source</a></span><a href="#method.hash_slice" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice" class="fn">hash_slice</a>&lt;H&gt;(data: &amp;[Self], state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut H</a>)<div class="where">where
H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-Ord-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <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="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: Mutability,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> 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></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1021-1023">Source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>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></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1060-1062">Source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>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></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1086-1088">Source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBitPtr%3CM2,+T2,+O%3E%3E-for-BitPtr%3CM1,+T1,+O%3E" class="impl"><a href="#impl-PartialEq%3CBitPtr%3CM2,+T2,+O%3E%3E-for-BitPtr%3CM1,+T1,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M1, M2, T1, T2, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M2, T2, O&gt;&gt; for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M1, T1, O&gt;<div class="where">where
M1: Mutability,
M2: Mutability,
T1: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M2, T2, O&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#264">Source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBitPtr%3CM2,+T2,+O%3E%3E-for-BitPtr%3CM1,+T1,+O%3E" class="impl"><a href="#impl-PartialOrd%3CBitPtr%3CM2,+T2,+O%3E%3E-for-BitPtr%3CM1,+T1,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M1, M2, T1, T2, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M2, T2, O&gt;&gt; for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M1, T1, O&gt;<div class="where">where
M1: Mutability,
M2: Mutability,
T1: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M2, T2, O&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>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></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1398">Source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1416">Source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the
<code>&lt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1434">Source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code>
operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1452">Source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by
the <code>&gt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Pointer-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-Pointer-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html" title="trait core::fmt::Pointer">Pointer</a> for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: Mutability,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, fmt: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-RangeBounds%3CBitPtr%3CM,+T,+O%3E%3E-for-BitPtrRange%3CM,+T,+O%3E" class="impl"><a href="#impl-RangeBounds%3CBitPtr%3CM,+T,+O%3E%3E-for-BitPtrRange%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a>&lt;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;&gt; for <a class="struct" href="struct.BitPtrRange.html" title="struct common_base::bit_vec::prelude::BitPtrRange">BitPtrRange</a>&lt;M, T, O&gt;<div class="where">where
M: Mutability,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.start_bound" class="method trait-impl"><a href="#method.start_bound" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html#tymethod.start_bound" class="fn">start_bound</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/range/enum.Bound.html" title="enum core::ops::range::Bound">Bound</a>&lt;&amp;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;&gt;</h4></section></summary><div class='docblock'>Start index bound. <a href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html#tymethod.start_bound">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.end_bound" class="method trait-impl"><a href="#method.end_bound" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html#tymethod.end_bound" class="fn">end_bound</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/range/enum.Bound.html" title="enum core::ops::range::Bound">Bound</a>&lt;&amp;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;&gt;</h4></section></summary><div class='docblock'>End index bound. <a href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html#tymethod.end_bound">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.contains" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.35.0">1.35.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/ops/range.rs.html#842-845">Source</a></span><a href="#method.contains" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html#method.contains" class="fn">contains</a>&lt;U&gt;(&amp;self, item: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;U</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;U&gt;,
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;T&gt; + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Returns <code>true</code> if <code>item</code> is contained in the range. <a href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html#method.contains">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/ops/range.rs.html#910-912">Source</a><a href="#method.is_empty" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html#method.is_empty" class="fn">is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>range_bounds_is_empty</code>)</span></div></span><div class='docblock'>Returns <code>true</code> if the range contains no items.
One-sided ranges (<code>RangeFrom</code>, etc) always return <code>false</code>. <a href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html#method.is_empty">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-TryFrom%3C*const+T%3E-for-BitPtr%3CConst,+T,+O%3E" class="impl"><a href="#impl-TryFrom%3C*const+T%3E-for-BitPtr%3CConst,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const T</a>&gt; for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = BitPtrError&lt;T&gt;</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(
elem: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const T</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T, O&gt;, &lt;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const T</a>&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-TryFrom%3C*mut+T%3E-for-BitPtr%3CMut,+T,+O%3E" class="impl"><a href="#impl-TryFrom%3C*mut+T%3E-for-BitPtr%3CMut,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut T</a>&gt; for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = BitPtrError&lt;T&gt;</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from-1" class="method trait-impl"><a href="#method.try_from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(
elem: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut T</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt;, &lt;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut T</a>&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-Copy-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-Copy-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: Mutability,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section><section id="impl-Eq-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-Eq-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <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="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: Mutability,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-Freeze-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a>,</div></h3></section><section id="impl-RefUnwindSafe-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-RefUnwindSafe-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,
O: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,
&lt;T as <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>&gt;::<a class="associatedtype" href="trait.BitStore.html#associatedtype.Mem" title="type common_base::bit_vec::prelude::BitStore::Mem">Mem</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</div></h3></section><section id="impl-Send-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-Send-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M = Const, T = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, O = <a class="struct" href="struct.LocalBits.html" title="struct common_base::bit_vec::prelude::LocalBits">Lsb0</a>&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;</h3></section><section id="impl-Sync-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-Sync-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M = Const, T = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, O = <a class="struct" href="struct.LocalBits.html" title="struct common_base::bit_vec::prelude::LocalBits">Lsb0</a>&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;</h3></section><section id="impl-Unpin-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-Unpin-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
O: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section><section id="impl-UnwindSafe-for-BitPtr%3CM,+T,+O%3E" class="impl"><a href="#impl-UnwindSafe-for-BitPtr%3CM,+T,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;M, T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;M, T, O&gt;<div class="where">where
M: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,
O: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,
&lt;T as <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>&gt;::<a class="associatedtype" href="trait.BitStore.html#associatedtype.Mem" title="type common_base::bit_vec::prelude::BitStore::Mem">Mem</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</div></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CloneToUninit-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#515">Source</a><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html" title="trait core::clone::CloneToUninit">CloneToUninit</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#517">Source</a><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit" class="fn">clone_to_uninit</a>(&amp;self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dest</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Comparable%3CK%3E-for-Q" class="impl"><a href="#impl-Comparable%3CK%3E-for-Q" class="anchor">§</a><h3 class="code-header">impl&lt;Q, K&gt; Comparable&lt;K&gt; for Q<div class="where">where
Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;Q&gt; + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.compare" class="method trait-impl"><a href="#method.compare" class="anchor">§</a><h4 class="code-header">fn <a class="fn">compare</a>(&amp;self, key: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;K</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>Compare self to <code>key</code> and return their ordering.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Conv-for-T" class="impl"><a href="#impl-Conv-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Conv for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.conv" class="method trait-impl"><a href="#method.conv" class="anchor">§</a><h4 class="code-header">fn <a class="fn">conv</a>&lt;T&gt;(self) -&gt; T<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h4></section></summary><div class='docblock'>Converts <code>self</code> into <code>T</code> using <code>Into&lt;T&gt;</code>. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Equivalent%3CK%3E-for-Q" class="impl"><a href="#impl-Equivalent%3CK%3E-for-Q" class="anchor">§</a><h3 class="code-header">impl&lt;Q, K&gt; Equivalent&lt;K&gt; for Q<div class="where">where
Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;Q&gt; + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.equivalent" class="method trait-impl"><a href="#method.equivalent" class="anchor">§</a><h4 class="code-header">fn <a class="fn">equivalent</a>(&amp;self, key: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;K</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Checks if this value is equivalent to the given key. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Equivalent%3CK%3E-for-Q-1" class="impl"><a href="#impl-Equivalent%3CK%3E-for-Q-1" class="anchor">§</a><h3 class="code-header">impl&lt;Q, K&gt; Equivalent&lt;K&gt; for Q<div class="where">where
Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;Q&gt; + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.equivalent-1" class="method trait-impl"><a href="#method.equivalent-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">equivalent</a>(&amp;self, key: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;K</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Compare self to <code>key</code> and return <code>true</code> if they are equal.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-FmtForward-for-T" class="impl"><a href="#impl-FmtForward-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; FmtForward for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt_binary" class="method trait-impl"><a href="#method.fmt_binary" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fmt_binary</a>(self) -&gt; FmtBinary&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html" title="trait core::fmt::Binary">Binary</a>,</div></h4></section></summary><div class='docblock'>Causes <code>self</code> to use its <code>Binary</code> implementation when <code>Debug</code>-formatted.</div></details><details class="toggle method-toggle" open><summary><section id="method.fmt_display" class="method trait-impl"><a href="#method.fmt_display" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fmt_display</a>(self) -&gt; FmtDisplay&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>,</div></h4></section></summary><div class='docblock'>Causes <code>self</code> to use its <code>Display</code> implementation when
<code>Debug</code>-formatted.</div></details><details class="toggle method-toggle" open><summary><section id="method.fmt_lower_exp" class="method trait-impl"><a href="#method.fmt_lower_exp" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fmt_lower_exp</a>(self) -&gt; FmtLowerExp&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerExp.html" title="trait core::fmt::LowerExp">LowerExp</a>,</div></h4></section></summary><div class='docblock'>Causes <code>self</code> to use its <code>LowerExp</code> implementation when
<code>Debug</code>-formatted.</div></details><details class="toggle method-toggle" open><summary><section id="method.fmt_lower_hex" class="method trait-impl"><a href="#method.fmt_lower_hex" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fmt_lower_hex</a>(self) -&gt; FmtLowerHex&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html" title="trait core::fmt::LowerHex">LowerHex</a>,</div></h4></section></summary><div class='docblock'>Causes <code>self</code> to use its <code>LowerHex</code> implementation when
<code>Debug</code>-formatted.</div></details><details class="toggle method-toggle" open><summary><section id="method.fmt_octal" class="method trait-impl"><a href="#method.fmt_octal" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fmt_octal</a>(self) -&gt; FmtOctal&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html" title="trait core::fmt::Octal">Octal</a>,</div></h4></section></summary><div class='docblock'>Causes <code>self</code> to use its <code>Octal</code> implementation when <code>Debug</code>-formatted.</div></details><details class="toggle method-toggle" open><summary><section id="method.fmt_pointer" class="method trait-impl"><a href="#method.fmt_pointer" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fmt_pointer</a>(self) -&gt; FmtPointer&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html" title="trait core::fmt::Pointer">Pointer</a>,</div></h4></section></summary><div class='docblock'>Causes <code>self</code> to use its <code>Pointer</code> implementation when
<code>Debug</code>-formatted.</div></details><details class="toggle method-toggle" open><summary><section id="method.fmt_upper_exp" class="method trait-impl"><a href="#method.fmt_upper_exp" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fmt_upper_exp</a>(self) -&gt; FmtUpperExp&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperExp.html" title="trait core::fmt::UpperExp">UpperExp</a>,</div></h4></section></summary><div class='docblock'>Causes <code>self</code> to use its <code>UpperExp</code> implementation when
<code>Debug</code>-formatted.</div></details><details class="toggle method-toggle" open><summary><section id="method.fmt_upper_hex" class="method trait-impl"><a href="#method.fmt_upper_hex" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fmt_upper_hex</a>(self) -&gt; FmtUpperHex&lt;Self&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a>,</div></h4></section></summary><div class='docblock'>Causes <code>self</code> to use its <code>UpperHex</code> implementation when
<code>Debug</code>-formatted.</div></details><details class="toggle method-toggle" open><summary><section id="method.fmt_list" class="method trait-impl"><a href="#method.fmt_list" class="anchor">§</a><h4 class="code-header">fn <a class="fn">fmt_list</a>(self) -&gt; FmtList&lt;Self&gt;<div class="where">where
&amp;'a Self: for&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,</div></h4></section></summary><div class='docblock'>Formats each item in a sequence. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Pipe-for-T" class="impl"><a href="#impl-Pipe-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Pipe for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.pipe" class="method trait-impl"><a href="#method.pipe" class="anchor">§</a><h4 class="code-header">fn <a class="fn">pipe</a>&lt;R&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self) -&gt; R) -&gt; R<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Pipes by value. This is generally the method you want to use. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.pipe_ref" class="method trait-impl"><a href="#method.pipe_ref" class="anchor">§</a><h4 class="code-header">fn <a class="fn">pipe_ref</a>&lt;'a, R&gt;(&amp;'a self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;'a Self) -&gt; R) -&gt; R<div class="where">where
R: 'a,</div></h4></section></summary><div class='docblock'>Borrows <code>self</code> and passes that borrow into the pipe function. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.pipe_ref_mut" class="method trait-impl"><a href="#method.pipe_ref_mut" class="anchor">§</a><h4 class="code-header">fn <a class="fn">pipe_ref_mut</a>&lt;'a, R&gt;(&amp;'a mut self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;'a mut Self) -&gt; R) -&gt; R<div class="where">where
R: 'a,</div></h4></section></summary><div class='docblock'>Mutably borrows <code>self</code> and passes that borrow into the pipe function. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.pipe_borrow" class="method trait-impl"><a href="#method.pipe_borrow" class="anchor">§</a><h4 class="code-header">fn <a class="fn">pipe_borrow</a>&lt;'a, B, R&gt;(&amp;'a self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a B</a>) -&gt; R) -&gt; R<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;B&gt;,
B: 'a + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
R: 'a,</div></h4></section></summary><div class='docblock'>Borrows <code>self</code>, then passes <code>self.borrow()</code> into the pipe function. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.pipe_borrow_mut" class="method trait-impl"><a href="#method.pipe_borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a class="fn">pipe_borrow_mut</a>&lt;'a, B, R&gt;(
&amp;'a mut self,
func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut B</a>) -&gt; R,
) -&gt; R<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;B&gt;,
B: 'a + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
R: 'a,</div></h4></section></summary><div class='docblock'>Mutably borrows <code>self</code>, then passes <code>self.borrow_mut()</code> into the pipe
function. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.pipe_as_ref" class="method trait-impl"><a href="#method.pipe_as_ref" class="anchor">§</a><h4 class="code-header">fn <a class="fn">pipe_as_ref</a>&lt;'a, U, R&gt;(&amp;'a self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a U</a>) -&gt; R) -&gt; R<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;U&gt;,
U: 'a + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
R: 'a,</div></h4></section></summary><div class='docblock'>Borrows <code>self</code>, then passes <code>self.as_ref()</code> into the pipe function.</div></details><details class="toggle method-toggle" open><summary><section id="method.pipe_as_mut" class="method trait-impl"><a href="#method.pipe_as_mut" class="anchor">§</a><h4 class="code-header">fn <a class="fn">pipe_as_mut</a>&lt;'a, U, R&gt;(&amp;'a mut self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut U</a>) -&gt; R) -&gt; R<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;U&gt;,
U: 'a + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
R: 'a,</div></h4></section></summary><div class='docblock'>Mutably borrows <code>self</code>, then passes <code>self.as_mut()</code> into the pipe
function.</div></details><details class="toggle method-toggle" open><summary><section id="method.pipe_deref" class="method trait-impl"><a href="#method.pipe_deref" class="anchor">§</a><h4 class="code-header">fn <a class="fn">pipe_deref</a>&lt;'a, T, R&gt;(&amp;'a self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a T</a>) -&gt; R) -&gt; R<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = T&gt;,
T: 'a + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
R: 'a,</div></h4></section></summary><div class='docblock'>Borrows <code>self</code>, then passes <code>self.deref()</code> into the pipe function.</div></details><details class="toggle method-toggle" open><summary><section id="method.pipe_deref_mut" class="method trait-impl"><a href="#method.pipe_deref_mut" class="anchor">§</a><h4 class="code-header">fn <a class="fn">pipe_deref_mut</a>&lt;'a, T, R&gt;(
&amp;'a mut self,
func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut T</a>) -&gt; R,
) -&gt; R<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a>&lt;Target = T&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>,
T: 'a + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
R: 'a,</div></h4></section></summary><div class='docblock'>Mutably borrows <code>self</code>, then passes <code>self.deref_mut()</code> into the pipe
function.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Tap-for-T" class="impl"><a href="#impl-Tap-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Tap for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.tap" class="method trait-impl"><a href="#method.tap" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap</a>(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self)) -&gt; Self</h4></section></summary><div class='docblock'>Immutable access to a value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.tap_mut" class="method trait-impl"><a href="#method.tap_mut" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_mut</a>(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut Self)) -&gt; Self</h4></section></summary><div class='docblock'>Mutable access to a value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.tap_borrow" class="method trait-impl"><a href="#method.tap_borrow" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_borrow</a>&lt;B&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;B</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;B&gt;,
B: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Immutable access to the <code>Borrow&lt;B&gt;</code> of a value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.tap_borrow_mut" class="method trait-impl"><a href="#method.tap_borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_borrow_mut</a>&lt;B&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut B</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;B&gt;,
B: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Mutable access to the <code>BorrowMut&lt;B&gt;</code> of a value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.tap_ref" class="method trait-impl"><a href="#method.tap_ref" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_ref</a>&lt;R&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;R</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;R&gt;,
R: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Immutable access to the <code>AsRef&lt;R&gt;</code> view of a value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.tap_ref_mut" class="method trait-impl"><a href="#method.tap_ref_mut" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_ref_mut</a>&lt;R&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut R</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;R&gt;,
R: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Mutable access to the <code>AsMut&lt;R&gt;</code> view of a value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.tap_deref" class="method trait-impl"><a href="#method.tap_deref" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_deref</a>&lt;T&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = T&gt;,
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Immutable access to the <code>Deref::Target</code> of a value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.tap_deref_mut" class="method trait-impl"><a href="#method.tap_deref_mut" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_deref_mut</a>&lt;T&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a>&lt;Target = T&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>,
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Mutable access to the <code>Deref::Target</code> of a value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.tap_dbg" class="method trait-impl"><a href="#method.tap_dbg" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_dbg</a>(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;Self)) -&gt; Self</h4></section></summary><div class='docblock'>Calls <code>.tap()</code> only in debug builds, and is erased in release builds.</div></details><details class="toggle method-toggle" open><summary><section id="method.tap_mut_dbg" class="method trait-impl"><a href="#method.tap_mut_dbg" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_mut_dbg</a>(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut Self)) -&gt; Self</h4></section></summary><div class='docblock'>Calls <code>.tap_mut()</code> only in debug builds, and is erased in release
builds.</div></details><details class="toggle method-toggle" open><summary><section id="method.tap_borrow_dbg" class="method trait-impl"><a href="#method.tap_borrow_dbg" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_borrow_dbg</a>&lt;B&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;B</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;B&gt;,
B: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Calls <code>.tap_borrow()</code> only in debug builds, and is erased in release
builds.</div></details><details class="toggle method-toggle" open><summary><section id="method.tap_borrow_mut_dbg" class="method trait-impl"><a href="#method.tap_borrow_mut_dbg" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_borrow_mut_dbg</a>&lt;B&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut B</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;B&gt;,
B: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Calls <code>.tap_borrow_mut()</code> only in debug builds, and is erased in release
builds.</div></details><details class="toggle method-toggle" open><summary><section id="method.tap_ref_dbg" class="method trait-impl"><a href="#method.tap_ref_dbg" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_ref_dbg</a>&lt;R&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;R</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;R&gt;,
R: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Calls <code>.tap_ref()</code> only in debug builds, and is erased in release
builds.</div></details><details class="toggle method-toggle" open><summary><section id="method.tap_ref_mut_dbg" class="method trait-impl"><a href="#method.tap_ref_mut_dbg" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_ref_mut_dbg</a>&lt;R&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut R</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;R&gt;,
R: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Calls <code>.tap_ref_mut()</code> only in debug builds, and is erased in release
builds.</div></details><details class="toggle method-toggle" open><summary><section id="method.tap_deref_dbg" class="method trait-impl"><a href="#method.tap_deref_dbg" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_deref_dbg</a>&lt;T&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = T&gt;,
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Calls <code>.tap_deref()</code> only in debug builds, and is erased in release
builds.</div></details><details class="toggle method-toggle" open><summary><section id="method.tap_deref_mut_dbg" class="method trait-impl"><a href="#method.tap_deref_mut_dbg" class="anchor">§</a><h4 class="code-header">fn <a class="fn">tap_deref_mut_dbg</a>&lt;T&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a>)) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a>&lt;Target = T&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>,
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Calls <code>.tap_deref_mut()</code> only in debug builds, and is erased in release
builds.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#84-86">Source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#88">Source</a><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89">Source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&amp;self) -&gt; T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#93">Source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryConv-for-T" class="impl"><a href="#impl-TryConv-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; TryConv for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.try_conv" class="method trait-impl"><a href="#method.try_conv" class="anchor">§</a><h4 class="code-header">fn <a class="fn">try_conv</a>&lt;T&gt;(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, Self::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" title="type core::convert::TryInto::Error">Error</a>&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;T&gt;,</div></h4></section></summary><div class='docblock'>Attempts to convert <code>self</code> into <code>T</code> using <code>TryInto&lt;T&gt;</code>. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-Any-for-T-1" class="impl"><a href="#impl-Any-for-T-1" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Any for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,</div></h3></section><section id="impl-CloneAny-for-T" class="impl"><a href="#impl-CloneAny-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; CloneAny for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section><section id="impl-NodeTrait-for-N" class="impl"><a class="src rightside" href="https://docs.rs/petgraph/0.4/src/petgraph/graphmap.rs.html#86">Source</a><a href="#impl-NodeTrait-for-N" class="anchor">§</a><h3 class="code-header">impl&lt;N&gt; <a class="trait" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a> for N<div class="where">where
N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,</div></h3></section></div></section></div></main></body></html>