Files
greptimedb/common_base/bit_vec/prelude/struct.BitArray.html
2025-12-25 19:26:42 +00:00

2120 lines
439 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="Bit-Precision Array Immediate"><title>BitArray 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="#">BitArray</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="#">BitArray</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#bit-precision-array-immediate" title="Bit-Precision Array Immediate">Bit-Precision Array Immediate</a><ul><li><a href="#original" title="Original">Original</a></li><li><a href="#usage" title="Usage">Usage</a></li><li><a href="#type-parameters" title="Type Parameters">Type Parameters</a></li><li><a href="#future-api-changes" title="Future API Changes">Future API Changes</a></li><li><a href="#large-bit-arrays" title="Large Bit-Arrays">Large Bit-Arrays</a></li><li><a href="#examples" title="Examples">Examples</a></li></ul></li></ul><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield._ord" title="_ord">_ord</a></li><li><a href="#structfield.data" title="data">data</a></li></ul><h3><a href="#implementations">Associated Constants</a></h3><ul class="block associatedconstant"><li><a href="#associatedconstant.ZERO" title="ZERO">ZERO</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.as_bitslice" title="as_bitslice">as_bitslice</a></li><li><a href="#method.as_mut_bitslice" title="as_mut_bitslice">as_mut_bitslice</a></li><li><a href="#method.as_mut_slice" title="as_mut_slice">as_mut_slice</a></li><li><a href="#method.as_raw_mut_slice" title="as_raw_mut_slice">as_raw_mut_slice</a></li><li><a href="#method.as_raw_slice" title="as_raw_slice">as_raw_slice</a></li><li><a href="#method.as_slice" title="as_slice">as_slice</a></li><li><a href="#method.into_inner" title="into_inner">into_inner</a></li><li><a href="#method.is_empty" title="is_empty">is_empty</a></li><li><a href="#method.len" title="len">len</a></li><li><a href="#method.new" title="new">new</a></li></ul><h3><a href="#deref-methods-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E">Methods from Deref&lt;<wbr>Target=<wbr>BitSlice&lt;&lt;<wbr>A as Bit<wbr>View&gt;::<wbr>Store, O&gt;&gt;</a></h3><ul class="block deref-methods"><li><a href="#method.align_to" title="align_to">align_to</a></li><li><a href="#method.align_to_mut" title="align_to_mut">align_to_mut</a></li><li><a href="#method.all" title="all">all</a></li><li><a href="#method.any" title="any">any</a></li><li><a href="#method.as_bitptr" title="as_bitptr">as_bitptr</a></li><li><a href="#method.as_bitptr_range" title="as_bitptr_range">as_bitptr_range</a></li><li><a href="#method.as_mut_bitptr" title="as_mut_bitptr">as_mut_bitptr</a></li><li><a href="#method.as_mut_bitptr_range" title="as_mut_bitptr_range">as_mut_bitptr_range</a></li><li><a href="#method.as_mut_ptr" title="as_mut_ptr">as_mut_ptr</a></li><li><a href="#method.as_mut_ptr_range" title="as_mut_ptr_range">as_mut_ptr_range</a></li><li><a href="#method.as_ptr" title="as_ptr">as_ptr</a></li><li><a href="#method.as_ptr_range" title="as_ptr_range">as_ptr_range</a></li><li><a href="#method.bit_domain" title="bit_domain">bit_domain</a></li><li><a href="#method.bit_domain_mut" title="bit_domain_mut">bit_domain_mut</a></li><li><a href="#method.chunks" title="chunks">chunks</a></li><li><a href="#method.chunks_exact" title="chunks_exact">chunks_exact</a></li><li><a href="#method.chunks_exact_mut" title="chunks_exact_mut">chunks_exact_mut</a></li><li><a href="#method.chunks_mut" title="chunks_mut">chunks_mut</a></li><li><a href="#method.clone_from_bitslice" title="clone_from_bitslice">clone_from_bitslice</a></li><li><a href="#method.clone_from_slice" title="clone_from_slice">clone_from_slice</a></li><li><a href="#method.contains" title="contains">contains</a></li><li><a href="#method.copy_from_bitslice" title="copy_from_bitslice">copy_from_bitslice</a></li><li><a href="#method.copy_from_slice" title="copy_from_slice">copy_from_slice</a></li><li><a href="#method.copy_within" title="copy_within">copy_within</a></li><li><a href="#method.copy_within_unchecked" title="copy_within_unchecked">copy_within_unchecked</a></li><li><a href="#method.count_ones" title="count_ones">count_ones</a></li><li><a href="#method.count_zeros" title="count_zeros">count_zeros</a></li><li><a href="#method.domain" title="domain">domain</a></li><li><a href="#method.domain_mut" title="domain_mut">domain_mut</a></li><li><a href="#method.ends_with" title="ends_with">ends_with</a></li><li><a href="#method.fill" title="fill">fill</a></li><li><a href="#method.fill_with" title="fill_with">fill_with</a></li><li><a href="#method.first" title="first">first</a></li><li><a href="#method.first_mut" title="first_mut">first_mut</a></li><li><a href="#method.first_one" title="first_one">first_one</a></li><li><a href="#method.first_zero" title="first_zero">first_zero</a></li><li><a href="#method.get" title="get">get</a></li><li><a href="#method.get_mut" title="get_mut">get_mut</a></li><li><a href="#method.get_unchecked" title="get_unchecked">get_unchecked</a></li><li><a href="#method.get_unchecked_mut" title="get_unchecked_mut">get_unchecked_mut</a></li><li><a href="#method.is_empty-1" title="is_empty">is_empty</a></li><li><a href="#method.iter" title="iter">iter</a></li><li><a href="#method.iter_mut" title="iter_mut">iter_mut</a></li><li><a href="#method.iter_ones" title="iter_ones">iter_ones</a></li><li><a href="#method.iter_zeros" title="iter_zeros">iter_zeros</a></li><li><a href="#method.last" title="last">last</a></li><li><a href="#method.last_mut" title="last_mut">last_mut</a></li><li><a href="#method.last_one" title="last_one">last_one</a></li><li><a href="#method.last_zero" title="last_zero">last_zero</a></li><li><a href="#method.leading_ones" title="leading_ones">leading_ones</a></li><li><a href="#method.leading_zeros" title="leading_zeros">leading_zeros</a></li><li><a href="#method.len-1" title="len">len</a></li><li><a href="#method.not_all" title="not_all">not_all</a></li><li><a href="#method.not_any" title="not_any">not_any</a></li><li><a href="#method.rchunks" title="rchunks">rchunks</a></li><li><a href="#method.rchunks_exact" title="rchunks_exact">rchunks_exact</a></li><li><a href="#method.rchunks_exact_mut" title="rchunks_exact_mut">rchunks_exact_mut</a></li><li><a href="#method.rchunks_mut" title="rchunks_mut">rchunks_mut</a></li><li><a href="#method.repeat" title="repeat">repeat</a></li><li><a href="#method.replace" title="replace">replace</a></li><li><a href="#method.replace_unchecked" title="replace_unchecked">replace_unchecked</a></li><li><a href="#method.reverse" title="reverse">reverse</a></li><li><a href="#method.rotate_left" title="rotate_left">rotate_left</a></li><li><a href="#method.rotate_right" title="rotate_right">rotate_right</a></li><li><a href="#method.rsplit" title="rsplit">rsplit</a></li><li><a href="#method.rsplit_mut" title="rsplit_mut">rsplit_mut</a></li><li><a href="#method.rsplitn" title="rsplitn">rsplitn</a></li><li><a href="#method.rsplitn_mut" title="rsplitn_mut">rsplitn_mut</a></li><li><a href="#method.set" title="set">set</a></li><li><a href="#method.set_aliased" title="set_aliased">set_aliased</a></li><li><a href="#method.set_aliased_unchecked" title="set_aliased_unchecked">set_aliased_unchecked</a></li><li><a href="#method.set_unchecked" title="set_unchecked">set_unchecked</a></li><li><a href="#method.shift_left" title="shift_left">shift_left</a></li><li><a href="#method.shift_right" title="shift_right">shift_right</a></li><li><a href="#method.some" title="some">some</a></li><li><a href="#method.split" title="split">split</a></li><li><a href="#method.split_at" title="split_at">split_at</a></li><li><a href="#method.split_at_mut" title="split_at_mut">split_at_mut</a></li><li><a href="#method.split_at_unchecked" title="split_at_unchecked">split_at_unchecked</a></li><li><a href="#method.split_at_unchecked_mut" title="split_at_unchecked_mut">split_at_unchecked_mut</a></li><li><a href="#method.split_first" title="split_first">split_first</a></li><li><a href="#method.split_first_mut" title="split_first_mut">split_first_mut</a></li><li><a href="#method.split_inclusive" title="split_inclusive">split_inclusive</a></li><li><a href="#method.split_inclusive_mut" title="split_inclusive_mut">split_inclusive_mut</a></li><li><a href="#method.split_last" title="split_last">split_last</a></li><li><a href="#method.split_last_mut" title="split_last_mut">split_last_mut</a></li><li><a href="#method.split_mut" title="split_mut">split_mut</a></li><li><a href="#method.splitn" title="splitn">splitn</a></li><li><a href="#method.splitn_mut" title="splitn_mut">splitn_mut</a></li><li><a href="#method.starts_with" title="starts_with">starts_with</a></li><li><a href="#method.strip_prefix" title="strip_prefix">strip_prefix</a></li><li><a href="#method.strip_suffix" title="strip_suffix">strip_suffix</a></li><li><a href="#method.swap" title="swap">swap</a></li><li><a href="#method.swap_unchecked" title="swap_unchecked">swap_unchecked</a></li><li><a href="#method.swap_with_bitslice" title="swap_with_bitslice">swap_with_bitslice</a></li><li><a href="#method.swap_with_slice" title="swap_with_slice">swap_with_slice</a></li><li><a href="#method.to_bitvec" title="to_bitvec">to_bitvec</a></li><li><a href="#method.to_vec" title="to_vec">to_vec</a></li><li><a href="#method.trailing_ones" title="trailing_ones">trailing_ones</a></li><li><a href="#method.trailing_zeros" title="trailing_zeros">trailing_zeros</a></li><li><a href="#method.windows" title="windows">windows</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsMut%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" title="AsMut&#60;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;">AsMut&#60;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;</a></li><li><a href="#impl-AsRef%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" title="AsRef&#60;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;">AsRef&#60;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;</a></li><li><a href="#impl-Binary-for-BitArray%3CA,+O%3E" title="Binary">Binary</a></li><li><a href="#impl-BitAnd%3CRhs%3E-for-BitArray%3CA,+O%3E" title="BitAnd&#60;Rhs&#62;">BitAnd&#60;Rhs&#62;</a></li><li><a href="#impl-BitAndAssign%3C%26BitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" title="BitAndAssign&#60;&#38;BitArray&#60;A, O&#62;&#62;">BitAndAssign&#60;&#38;BitArray&#60;A, O&#62;&#62;</a></li><li><a href="#impl-BitAndAssign%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" title="BitAndAssign&#60;BitArray&#60;A, O&#62;&#62;">BitAndAssign&#60;BitArray&#60;A, O&#62;&#62;</a></li><li><a href="#impl-BitAndAssign%3CRhs%3E-for-BitArray%3CA,+O%3E" title="BitAndAssign&#60;Rhs&#62;">BitAndAssign&#60;Rhs&#62;</a></li><li><a href="#impl-BitField-for-BitArray%3CA,+O%3E" title="BitField">BitField</a></li><li><a href="#impl-BitOr%3CRhs%3E-for-BitArray%3CA,+O%3E" title="BitOr&#60;Rhs&#62;">BitOr&#60;Rhs&#62;</a></li><li><a href="#impl-BitOrAssign%3C%26BitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" title="BitOrAssign&#60;&#38;BitArray&#60;A, O&#62;&#62;">BitOrAssign&#60;&#38;BitArray&#60;A, O&#62;&#62;</a></li><li><a href="#impl-BitOrAssign%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" title="BitOrAssign&#60;BitArray&#60;A, O&#62;&#62;">BitOrAssign&#60;BitArray&#60;A, O&#62;&#62;</a></li><li><a href="#impl-BitOrAssign%3CRhs%3E-for-BitArray%3CA,+O%3E" title="BitOrAssign&#60;Rhs&#62;">BitOrAssign&#60;Rhs&#62;</a></li><li><a href="#impl-BitXor%3CRhs%3E-for-BitArray%3CA,+O%3E" title="BitXor&#60;Rhs&#62;">BitXor&#60;Rhs&#62;</a></li><li><a href="#impl-BitXorAssign%3C%26BitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" title="BitXorAssign&#60;&#38;BitArray&#60;A, O&#62;&#62;">BitXorAssign&#60;&#38;BitArray&#60;A, O&#62;&#62;</a></li><li><a href="#impl-BitXorAssign%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" title="BitXorAssign&#60;BitArray&#60;A, O&#62;&#62;">BitXorAssign&#60;BitArray&#60;A, O&#62;&#62;</a></li><li><a href="#impl-BitXorAssign%3CRhs%3E-for-BitArray%3CA,+O%3E" title="BitXorAssign&#60;Rhs&#62;">BitXorAssign&#60;Rhs&#62;</a></li><li><a href="#impl-Borrow%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" title="Borrow&#60;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;">Borrow&#60;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;</a></li><li><a href="#impl-BorrowMut%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" title="BorrowMut&#60;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;">BorrowMut&#60;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;</a></li><li><a href="#impl-Clone-for-BitArray%3CA,+O%3E" title="Clone">Clone</a></li><li><a href="#impl-Copy-for-BitArray%3CA,+O%3E" title="Copy">Copy</a></li><li><a href="#impl-Debug-for-BitArray%3CA,+O%3E" title="Debug">Debug</a></li><li><a href="#impl-Default-for-BitArray%3CA,+O%3E" title="Default">Default</a></li><li><a href="#impl-__Deref-for-BitArray%3CA,+O%3E" title="Deref">Deref</a></li><li><a href="#impl-DerefMut-for-BitArray%3CA,+O%3E" title="DerefMut">DerefMut</a></li><li><a href="#impl-Display-for-BitArray%3CA,+O%3E" title="Display">Display</a></li><li><a href="#impl-Eq-for-BitArray%3CA,+O%3E" title="Eq">Eq</a></li><li><a href="#impl-From%3CA%3E-for-BitArray%3CA,+O%3E" title="From&#60;A&#62;">From&#60;A&#62;</a></li><li><a href="#impl-From%3CBitArray%3CA,+O%3E%3E-for-BitBox%3C%3CA+as+BitView%3E::Store,+O%3E" title="From&#60;BitArray&#60;A, O&#62;&#62;">From&#60;BitArray&#60;A, O&#62;&#62;</a></li><li><a href="#impl-From%3CBitArray%3CA,+O%3E%3E-for-BitVec%3C%3CA+as+BitView%3E::Store,+O%3E" title="From&#60;BitArray&#60;A, O&#62;&#62;">From&#60;BitArray&#60;A, O&#62;&#62;</a></li><li><a href="#impl-Hash-for-BitArray%3CA,+O%3E" title="Hash">Hash</a></li><li><a href="#impl-Index%3CIdx%3E-for-BitArray%3CA,+O%3E" title="Index&#60;Idx&#62;">Index&#60;Idx&#62;</a></li><li><a href="#impl-IndexMut%3CIdx%3E-for-BitArray%3CA,+O%3E" title="IndexMut&#60;Idx&#62;">IndexMut&#60;Idx&#62;</a></li><li><a href="#impl-IntoIterator-for-%26BitArray%3CA,+O%3E" title="IntoIterator">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-%26mut+BitArray%3CA,+O%3E" title="IntoIterator">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-BitArray%3CA,+O%3E" title="IntoIterator">IntoIterator</a></li><li><a href="#impl-LowerHex-for-BitArray%3CA,+O%3E" title="LowerHex">LowerHex</a></li><li><a href="#impl-Not-for-BitArray%3CA,+O%3E" title="Not">Not</a></li><li><a href="#impl-Octal-for-BitArray%3CA,+O%3E" title="Octal">Octal</a></li><li><a href="#impl-Ord-for-BitArray%3CA,+O%3E" title="Ord">Ord</a></li><li><a href="#impl-PartialEq%3CBitArray%3CA,+O2%3E%3E-for-BitSlice%3CT,+O1%3E" title="PartialEq&#60;BitArray&#60;A, O2&#62;&#62;">PartialEq&#60;BitArray&#60;A, O2&#62;&#62;</a></li><li><a href="#impl-PartialEq%3CRhs%3E-for-BitArray%3CA,+O%3E" title="PartialEq&#60;Rhs&#62;">PartialEq&#60;Rhs&#62;</a></li><li><a href="#impl-PartialOrd%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3CT,+O%3E" title="PartialOrd&#60;BitArray&#60;A, O&#62;&#62;">PartialOrd&#60;BitArray&#60;A, O&#62;&#62;</a></li><li><a href="#impl-PartialOrd%3CRhs%3E-for-BitArray%3CA,+O%3E" title="PartialOrd&#60;Rhs&#62;">PartialOrd&#60;Rhs&#62;</a></li><li><a href="#impl-TryFrom%3C%26BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-%26BitArray%3CA,+O%3E" title="TryFrom&#60;&#38;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;">TryFrom&#60;&#38;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;</a></li><li><a href="#impl-TryFrom%3C%26BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" title="TryFrom&#60;&#38;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;">TryFrom&#60;&#38;BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;</a></li><li><a href="#impl-TryFrom%3C%26mut+BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-%26mut+BitArray%3CA,+O%3E" title="TryFrom&#60;&#38;mut BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;">TryFrom&#60;&#38;mut BitSlice&#60;&#60;A as BitView&#62;::Store, O&#62;&#62;</a></li><li><a href="#impl-Unpin-for-BitArray%3CA,+O%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UpperHex-for-BitArray%3CA,+O%3E" title="UpperHex">UpperHex</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-BitArray%3CA,+O%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-BitArray%3CA,+O%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-BitArray%3CA,+O%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-BitArray%3CA,+O%3E" title="Sync">Sync</a></li><li><a href="#impl-UnwindSafe-for-BitArray%3CA,+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-CloneAnySend-for-T" title="CloneAnySend">CloneAnySend</a></li><li><a href="#impl-CloneAnySendSync-for-T" title="CloneAnySendSync">CloneAnySendSync</a></li><li><a href="#impl-CloneAnySync-for-T" title="CloneAnySync">CloneAnySync</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-Receiver-for-P" title="Receiver">Receiver</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-ToString-for-T" title="ToString">ToString</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">BitArray</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(transparent)]</div>pub struct BitArray&lt;A = [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">1</a>], O = <a class="struct" href="struct.LocalBits.html" title="struct common_base::bit_vec::prelude::LocalBits">Lsb0</a>&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div>{
pub _ord: <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;,
pub data: A,
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="bit-precision-array-immediate"><a class="doc-anchor" href="#bit-precision-array-immediate">§</a>Bit-Precision Array Immediate</h2>
<p>This type is a wrapper over the <a href="https://doc.rust-lang.org/std/primitive.array.html">array fundamental</a> <code>[T; N]</code> that views its
contents as a <a href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice"><code>BitSlice</code></a> region. As an array, it can be held directly by value
and does not require an indirection such as the <code>&amp;BitSlice</code> reference.</p>
<h3 id="original"><a class="doc-anchor" href="#original">§</a>Original</h3>
<p><a href="https://doc.rust-lang.org/std/primitive.array.html"><code>[T; N]</code></a></p>
<h3 id="usage"><a class="doc-anchor" href="#usage">§</a>Usage</h3>
<p><code>BitArray</code> is a Rust analogue of the C++ <a href="https://en.cppreference.com/w/cpp/utility/bitset"><code>std::bitset&lt;N&gt;</code></a> container. However,
restrictions in the Rust type system do not allow specifying exact bit lengths
in the array type. Instead, it must specify a storage array that can contain all
the bits you want.</p>
<p>Because <code>BitArray</code> is a plain-old-data object, its fields are public and it has
no restrictions on its interior value. You can freely access the interior
storage and move data in or out of the <code>BitArray</code> type with no cost.</p>
<p>As a convenience, the <a href="macro.BitArr.html" title="macro common_base::bit_vec::prelude::BitArr"><code>BitArr!</code></a> type-constructor macro can produce correct
type definitions from an exact bit count and your memory-layout type parameters.
Values of that type can then be built from the <a href="macro.BitArr.html" title="macro common_base::bit_vec::prelude::BitArr"><code>bitarr!</code></a> <em>value</em>-constructor
macro:</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">type </span>Example = <span class="macro">BitArr!</span>(<span class="kw">for </span><span class="number">43</span>, <span class="kw">in </span>u32, Msb0);
<span class="kw">let </span>example: Example = <span class="macro">bitarr!</span>(u32, Msb0; <span class="number">1</span>; <span class="number">33</span>);
<span class="kw">struct </span>HasBitfield {
inner: Example,
}
<span class="kw">let </span>ex2 = HasBitfield {
inner: BitArray::new([<span class="number">1</span>, <span class="number">2</span>]),
};</code></pre></div>
<p>Note that the actual type of the <code>Example</code> alias is <code>BitArray&lt;[u32; 2], Msb0&gt;</code>,
as that is <code>ceil(32, 43)</code>, so the <code>bitarr!</code> macro can accept any number of bits
in <code>33 .. 65</code> and will produce a value of the correct type.</p>
<h3 id="type-parameters"><a class="doc-anchor" href="#type-parameters">§</a>Type Parameters</h3>
<p><code>BitArray</code> differs from the other data structures in the crate in that it does
not take a <code>T: BitStore</code> parameter, but rather takes <code>A: BitViewSized</code>. That
trait is implemented by all <code>T: BitStore</code> scalars and all <code>[T; N]</code> arrays of
them, and provides the logic to translate the aggregate storage into the memory
sequence that the crate expects.</p>
<p>As with all <code>BitSlice</code> regions, the <code>O: BitOrder</code> parameter specifies the
ordering of bits within a single <code>A::Store</code> element.</p>
<h3 id="future-api-changes"><a class="doc-anchor" href="#future-api-changes">§</a>Future API Changes</h3>
<p>Exact bit lengths cannot be encoded into the <code>BitArray</code> type until the
const-generics system in the compiler can allow type-level computation on type
integers. When this stabilizes, <code>bitvec</code> will issue a major upgrade that
replaces the <code>BitArray&lt;A, O&gt;</code> definition with <code>BitArray&lt;T, O, const N: usize&gt;</code>
and match the C++ <code>std::bitset&lt;N&gt;</code> definition.</p>
<h3 id="large-bit-arrays"><a class="doc-anchor" href="#large-bit-arrays">§</a>Large Bit-Arrays</h3>
<p>As with ordinary arrays, large arrays can be expensive to move by value, and
should generally be preferred to have static locations such as actual <code>static</code>
bindings, a long lifetime in a low stack frame, or a heap allocation. While you
certainly can <code>Box&lt;[BitArray&lt;A, O&gt;]&gt;</code> directly, you may instead prefer the
<a href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox"><code>BitBox</code></a> or <a href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec"><code>BitVec</code></a> heap-allocated regions. These offer the same storage
behavior and are better optimized than <code>Box&lt;BitArray&gt;</code> for working with the
contained <code>BitSlice</code> region.</p>
<h3 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h3>
<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">const </span>WELL_KNOWN: <span class="macro">BitArr!</span>(<span class="kw">for </span><span class="number">16</span>, <span class="kw">in </span>u8, Lsb0) = BitArray::&lt;[u8; <span class="number">2</span>], Lsb0&gt; {
data: <span class="kw-2">*</span><span class="string">b"bv"</span>,
..BitArray::ZERO
};
<span class="kw">struct </span>HasBitfields {
inner: <span class="macro">BitArr!</span>(<span class="kw">for </span><span class="number">50</span>, <span class="kw">in </span>u8, Lsb0),
}
<span class="kw">impl </span>HasBitfields {
<span class="kw">fn </span>new() -&gt; <span class="self">Self </span>{
<span class="self">Self </span>{
inner: <span class="macro">bitarr!</span>(u8, Lsb0; <span class="number">0</span>; <span class="number">50</span>),
}
}
<span class="kw">fn </span>some_field(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>BitSlice&lt;u8, Lsb0&gt; {
<span class="kw-2">&amp;</span><span class="self">self</span>.inner[<span class="number">2 </span>.. <span class="number">52</span>]
}
}</code></pre></div></div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield._ord" class="structfield section-header"><a href="#structfield._ord" class="anchor field">§</a><code>_ord: <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><div class="docblock"><p>The ordering of bits within an <code>A::Store</code> element.</p>
</div><span id="structfield.data" class="structfield section-header"><a href="#structfield.data" class="anchor field">§</a><code>data: A</code></span><div class="docblock"><p>The wrapped data buffer.</p>
</div><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-BitArray%3CA,+O%3E" class="impl"><a href="#impl-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.as_slice" class="method"><h4 class="code-header">pub fn <a href="#method.as_slice" class="fn">as_slice</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;BitSlice&lt;&lt;A as BitView&gt;::Store, O&gt;"></a></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>.as_bitslice()</code> or <code>.as_raw_slice()</code> instead</span></div></span></summary><div class="docblock"><p>Returns a bit-slice containing the entire bit-array. Equivalent to
<code>&amp;a[..]</code>.</p>
<p>Because <code>BitArray</code> can be viewed as a slice of bits or as a slice of
elements with equal ease, you should switch to using <a href="struct.BitArray.html#method.as_bitslice" title="method common_base::bit_vec::prelude::BitArray::as_bitslice"><code>.as_bitslice()</code></a>
or <a href="struct.BitArray.html#method.as_raw_slice" title="method common_base::bit_vec::prelude::BitArray::as_raw_slice"><code>.as_raw_slice()</code></a> to make your choice explicit.</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.array.html#method.as_slice"><code>array::as_slice</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_slice" class="method"><h4 class="code-header">pub fn <a href="#method.as_mut_slice" class="fn">as_mut_slice</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;mut BitSlice&lt;&lt;A as BitView&gt;::Store, O&gt;"></a></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>.as_mut_bitslice()</code> or <code>.as_raw_mut_slice()</code> instead</span></div></span></summary><div class="docblock"><p>Returns a mutable bit-slice containing the entire bit-array. Equivalent
to <code>&amp;mut a[..]</code>.</p>
<p>Because <code>BitArray</code> can be viewed as a slice of bits or as a slice of
elements with equal ease, you should switch to using
<a href="struct.BitArray.html#method.as_mut_bitslice" title="method common_base::bit_vec::prelude::BitArray::as_mut_bitslice"><code>.as_mut_bitslice()</code></a> or <a href="struct.BitArray.html#method.as_raw_mut_slice" title="method common_base::bit_vec::prelude::BitArray::as_raw_mut_slice"><code>.as_raw_mut_slice()</code></a> to make your choice
explicit.</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.array.html#method.as_mut_slice"><code>array::as_mut_slice</code></a></p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitArray%3CA,+O%3E-1" class="impl"><a href="#impl-BitArray%3CA,+O%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.ZERO" class="associatedconstant"><h4 class="code-header">pub const <a href="#associatedconstant.ZERO" class="constant">ZERO</a>: <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;</h4></section></summary><div class="docblock"><p>A bit-array with all bits initialized to zero.</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>(data: A) -&gt; <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;</h4></section></summary><div class="docblock"><p>Wraps an existing buffer as a bit-array.</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">0u16</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
<span class="kw">let </span>bits = BitArray::&lt;<span class="kw">_</span>, Msb0&gt;::new(data);
<span class="macro">assert_eq!</span>(bits.len(), <span class="number">64</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.into_inner" class="method"><h4 class="code-header">pub fn <a href="#method.into_inner" class="fn">into_inner</a>(self) -&gt; A</h4></section></summary><div class="docblock"><p>Removes the bit-array wrapper, returning the contained buffer.</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>bits = <span class="macro">bitarr!</span>[<span class="number">0</span>; <span class="number">30</span>];
<span class="kw">let </span>native: [usize; <span class="number">1</span>] = bits.into_inner();</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.as_bitslice" class="method"><h4 class="code-header">pub fn <a href="#method.as_bitslice" class="fn">as_bitslice</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;BitSlice&lt;&lt;A as BitView&gt;::Store, O&gt;"></a></h4></section></summary><div class="docblock"><p>Explicitly views the bit-array as a bit-slice.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_bitslice" class="method"><h4 class="code-header">pub fn <a href="#method.as_mut_bitslice" class="fn">as_mut_bitslice</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;mut BitSlice&lt;&lt;A as BitView&gt;::Store, O&gt;"></a></h4></section></summary><div class="docblock"><p>Explicitly views the bit-array as a mutable bit-slice.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_raw_slice" class="method"><h4 class="code-header">pub fn <a href="#method.as_raw_slice" class="fn">as_raw_slice</a>(&amp;self) -&gt; &amp;[&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>]</h4></section></summary><div class="docblock"><p>Views the bit-array as a slice of its underlying memory elements.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_raw_mut_slice" class="method"><h4 class="code-header">pub fn <a href="#method.as_raw_mut_slice" class="fn">as_raw_mut_slice</a>(&amp;mut self) -&gt; &amp;mut [&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>]</h4></section></summary><div class="docblock"><p>Views the bit-array as a mutable slice of its underlying memory
elements.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.len" class="method"><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Gets the length (in bits) of the bit-array.</p>
<p>This method is a compile-time constant.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method"><h4 class="code-header">pub fn <a href="#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></h4></section></summary><div class="docblock"><p>Tests whether the array is empty.</p>
<p>This method is a compile-time constant.</p>
</div></details></div></details></div><details class="toggle big-toggle" open><summary><h2 id="deref-methods-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="section-header"><span>Methods from <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 = <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;&gt;</span><a href="#deref-methods-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="anchor">§</a></h2></summary><div id="deref-methods-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E-1" class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.len-1" class="method"><h4 class="code-header">pub fn <a href="#method.len-1" class="fn">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Gets the number of bits in the bit-slice.</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.slice.html#method.len"><code>slice::len</code></a></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="macro">assert_eq!</span>(<span class="macro">bits!</span>[].len(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">10</span>].len(), <span class="number">10</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty-1" class="method"><h4 class="code-header">pub fn <a href="#method.is_empty-1" class="fn">is_empty</a>(&amp;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>Tests if the bit-slice is empty (length zero).</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.slice.html#method.is_empty"><code>slice::is_empty</code></a></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="macro">assert!</span>(<span class="macro">bits!</span>[].is_empty());
<span class="macro">assert!</span>(!<span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">10</span>].is_empty());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.first" class="method"><h4 class="code-header">pub fn <a href="#method.first" class="fn">first</a>(&amp;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;'_, Const, T, O&gt;&gt;</h4></section></summary><div class="docblock"><p>Gets a reference to the first bit of the bit-slice, or <code>None</code> if it is
empty.</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.slice.html#method.first"><code>slice::first</code></a></p>
<h6 id="api-differences"><a class="doc-anchor" href="#api-differences">§</a>API Differences</h6>
<p><code>bitvec</code> uses a custom structure for both read-only and mutable
references to <code>bool</code>.</p>
<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>bits = <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>];
<span class="macro">assert_eq!</span>(bits.first().as_deref(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="bool-val">true</span>));
<span class="macro">assert!</span>(<span class="macro">bits!</span>[].first().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.first_mut" class="method"><h4 class="code-header">pub fn <a href="#method.first_mut" class="fn">first_mut</a>(&amp;mut 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;'_, Mut, T, O&gt;&gt;</h4></section></summary><div class="docblock"><p>Gets a mutable reference to the first bit of the bit-slice, or <code>None</code> if
it is empty.</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.slice.html#method.first_mut"><code>slice::first_mut</code></a></p>
<h6 id="api-differences-1"><a class="doc-anchor" href="#api-differences-1">§</a>API Differences</h6>
<p><code>bitvec</code> uses a custom structure for both read-only and mutable
references to <code>bool</code>. This must be bound as <code>mut</code> in order to write
through it.</p>
<h6 id="examples-6"><a class="doc-anchor" href="#examples-6">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>; <span class="number">3</span>];
<span class="kw">if let </span><span class="prelude-val">Some</span>(<span class="kw-2">mut </span>first) = bits.first_mut() {
<span class="kw-2">*</span>first = <span class="bool-val">true</span>;
}
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>]);
<span class="macro">assert!</span>(<span class="macro">bits!</span>[<span class="kw-2">mut</span>].first_mut().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.split_first" class="method"><h4 class="code-header">pub fn <a href="#method.split_first" class="fn">split_first</a>(&amp;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;'_, Const, T, O&gt;, &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;)&gt;</h4></section></summary><div class="docblock"><p>Splits the bit-slice into a reference to its first bit, and the rest of
the bit-slice. Returns <code>None</code> when empty.</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.slice.html#method.split_first"><code>slice::split_first</code></a></p>
<h6 id="api-differences-2"><a class="doc-anchor" href="#api-differences-2">§</a>API Differences</h6>
<p><code>bitvec</code> uses a custom structure for both read-only and mutable
references to <code>bool</code>.</p>
<h6 id="examples-7"><a class="doc-anchor" href="#examples-7">§</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>bits = <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>];
<span class="kw">let </span>(first, rest) = bits.split_first().unwrap();
<span class="macro">assert_eq!</span>(first, <span class="kw-2">&amp;</span><span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(rest, <span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">2</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.split_first_mut" class="method"><h4 class="code-header">pub fn <a href="#method.split_first_mut" class="fn">split_first_mut</a>(
&amp;mut 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;'_, Mut, &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.Alias" title="type common_base::bit_vec::prelude::BitStore::Alias">Alias</a>, O&gt;, &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&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.Alias" title="type common_base::bit_vec::prelude::BitStore::Alias">Alias</a>, O&gt;)&gt;</h4></section></summary><div class="docblock"><p>Splits the bit-slice into mutable references of its first bit, and the
rest of the bit-slice. Returns <code>None</code> when empty.</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.slice.html#method.split_first_mut"><code>slice::split_first_mut</code></a></p>
<h6 id="api-differences-3"><a class="doc-anchor" href="#api-differences-3">§</a>API Differences</h6>
<p><code>bitvec</code> uses a custom structure for both read-only and mutable
references to <code>bool</code>. This must be bound as <code>mut</code> in order to write
through it.</p>
<h6 id="examples-8"><a class="doc-anchor" href="#examples-8">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>; <span class="number">3</span>];
<span class="kw">if let </span><span class="prelude-val">Some</span>((<span class="kw-2">mut </span>first, rest)) = bits.split_first_mut() {
<span class="kw-2">*</span>first = <span class="bool-val">true</span>;
<span class="macro">assert_eq!</span>(rest, <span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">2</span>]);
}
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.split_last" class="method"><h4 class="code-header">pub fn <a href="#method.split_last" class="fn">split_last</a>(&amp;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;'_, Const, T, O&gt;, &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;)&gt;</h4></section></summary><div class="docblock"><p>Splits the bit-slice into a reference to its last bit, and the rest of
the bit-slice. Returns <code>None</code> when empty.</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.slice.html#method.split_last"><code>slice::split_last</code></a></p>
<h6 id="api-differences-4"><a class="doc-anchor" href="#api-differences-4">§</a>API Differences</h6>
<p><code>bitvec</code> uses a custom structure for both read-only and mutable
references to <code>bool</code>.</p>
<h6 id="examples-9"><a class="doc-anchor" href="#examples-9">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="kw">let </span>(last, rest) = bits.split_last().unwrap();
<span class="macro">assert_eq!</span>(last, <span class="kw-2">&amp;</span><span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(rest, <span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">2</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.split_last_mut" class="method"><h4 class="code-header">pub fn <a href="#method.split_last_mut" class="fn">split_last_mut</a>(
&amp;mut 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;'_, Mut, &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.Alias" title="type common_base::bit_vec::prelude::BitStore::Alias">Alias</a>, O&gt;, &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&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.Alias" title="type common_base::bit_vec::prelude::BitStore::Alias">Alias</a>, O&gt;)&gt;</h4></section></summary><div class="docblock"><p>Splits the bit-slice into mutable references to its last bit, and the
rest of the bit-slice. Returns <code>None</code> when empty.</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.slice.html#method.split_last_mut"><code>slice::split_last_mut</code></a></p>
<h6 id="api-differences-5"><a class="doc-anchor" href="#api-differences-5">§</a>API Differences</h6>
<p><code>bitvec</code> uses a custom structure for both read-only and mutable
references to <code>bool</code>. This must be bound as <code>mut</code> in order to write
through it.</p>
<h6 id="examples-10"><a class="doc-anchor" href="#examples-10">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>; <span class="number">3</span>];
<span class="kw">if let </span><span class="prelude-val">Some</span>((<span class="kw-2">mut </span>last, rest)) = bits.split_last_mut() {
<span class="kw-2">*</span>last = <span class="bool-val">true</span>;
<span class="macro">assert_eq!</span>(rest, <span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">2</span>]);
}
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.last" class="method"><h4 class="code-header">pub fn <a href="#method.last" class="fn">last</a>(&amp;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;'_, Const, T, O&gt;&gt;</h4></section></summary><div class="docblock"><p>Gets a reference to the last bit of the bit-slice, or <code>None</code> if it is
empty.</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.slice.html#method.last"><code>slice::last</code></a></p>
<h6 id="api-differences-6"><a class="doc-anchor" href="#api-differences-6">§</a>API Differences</h6>
<p><code>bitvec</code> uses a custom structure for both read-only and mutable
references to <code>bool</code>.</p>
<h6 id="examples-11"><a class="doc-anchor" href="#examples-11">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="macro">assert_eq!</span>(bits.last().as_deref(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="bool-val">true</span>));
<span class="macro">assert!</span>(<span class="macro">bits!</span>[].last().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.last_mut" class="method"><h4 class="code-header">pub fn <a href="#method.last_mut" class="fn">last_mut</a>(&amp;mut 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;'_, Mut, T, O&gt;&gt;</h4></section></summary><div class="docblock"><p>Gets a mutable reference to the last bit of the bit-slice, or <code>None</code> if
it is empty.</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.slice.html#method.last_mut"><code>slice::last_mut</code></a></p>
<h6 id="api-differences-7"><a class="doc-anchor" href="#api-differences-7">§</a>API Differences</h6>
<p><code>bitvec</code> uses a custom structure for both read-only and mutable
references to <code>bool</code>. This must be bound as <code>mut</code> in order to write
through it.</p>
<h6 id="examples-12"><a class="doc-anchor" href="#examples-12">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>; <span class="number">3</span>];
<span class="kw">if let </span><span class="prelude-val">Some</span>(<span class="kw-2">mut </span>last) = bits.last_mut() {
<span class="kw-2">*</span>last = <span class="bool-val">true</span>;
}
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>]);
<span class="macro">assert!</span>(<span class="macro">bits!</span>[<span class="kw-2">mut</span>].last_mut().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.get" class="method"><h4 class="code-header">pub fn <a href="#method.get" class="fn">get</a>&lt;'a, I&gt;(
&amp;'a self,
index: I,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&lt;I as BitSliceIndex&lt;'a, T, O&gt;&gt;::Immut&gt;<div class="where">where
I: BitSliceIndex&lt;'a, T, O&gt;,</div></h4></section></summary><div class="docblock"><p>Gets a reference to a single bit or a subsection of the bit-slice,
depending on the type of <code>index</code>.</p>
<ul>
<li>If given a <code>usize</code>, this produces a reference structure to the <code>bool</code>
at the position.</li>
<li>If given any form of range, this produces a smaller bit-slice.</li>
</ul>
<p>This returns <code>None</code> if the <code>index</code> departs the bounds of <code>self</code>.</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.slice.html#method.get"><code>slice::get</code></a></p>
<h6 id="api-differences-8"><a class="doc-anchor" href="#api-differences-8">§</a>API Differences</h6>
<p><code>BitSliceIndex</code> uses discrete types for immutable and mutable
references, rather than a single referent type.</p>
<h6 id="examples-13"><a class="doc-anchor" href="#examples-13">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="macro">assert_eq!</span>(bits.get(<span class="number">1</span>).as_deref(), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="bool-val">true</span>));
<span class="macro">assert_eq!</span>(bits.get(<span class="number">0 </span>.. <span class="number">2</span>), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]));
<span class="macro">assert!</span>(bits.get(<span class="number">3</span>).is_none());
<span class="macro">assert!</span>(bits.get(<span class="number">0 </span>.. <span class="number">4</span>).is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.get_mut" class="method"><h4 class="code-header">pub fn <a href="#method.get_mut" class="fn">get_mut</a>&lt;'a, I&gt;(
&amp;'a mut self,
index: I,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&lt;I as BitSliceIndex&lt;'a, T, O&gt;&gt;::Mut&gt;<div class="where">where
I: BitSliceIndex&lt;'a, T, O&gt;,</div></h4></section></summary><div class="docblock"><p>Gets a mutable reference to a single bit or a subsection of the
bit-slice, depending on the type of <code>index</code>.</p>
<ul>
<li>If given a <code>usize</code>, this produces a reference structure to the <code>bool</code>
at the position.</li>
<li>If given any form of range, this produces a smaller bit-slice.</li>
</ul>
<p>This returns <code>None</code> if the <code>index</code> departs the bounds of <code>self</code>.</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.slice.html#method.get_mut"><code>slice::get_mut</code></a></p>
<h6 id="api-differences-9"><a class="doc-anchor" href="#api-differences-9">§</a>API Differences</h6>
<p><code>BitSliceIndex</code> uses discrete types for immutable and mutable
references, rather than a single referent type.</p>
<h6 id="examples-14"><a class="doc-anchor" href="#examples-14">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>; <span class="number">3</span>];
<span class="kw-2">*</span>bits.get_mut(<span class="number">0</span>).unwrap() = <span class="bool-val">true</span>;
bits.get_mut(<span class="number">1 </span>..).unwrap().fill(<span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>; <span class="number">3</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.get_unchecked" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.get_unchecked" class="fn">get_unchecked</a>&lt;'a, I&gt;(
&amp;'a self,
index: I,
) -&gt; &lt;I as BitSliceIndex&lt;'a, T, O&gt;&gt;::Immut<div class="where">where
I: BitSliceIndex&lt;'a, T, O&gt;,</div></h4></section></summary><div class="docblock"><p>Gets a reference to a single bit or to a subsection of the bit-slice,
without bounds checking.</p>
<p>This has the same arguments and behavior as <a href="struct.BitSlice.html#method.get" title="method common_base::bit_vec::prelude::BitSlice::get"><code>.get()</code></a>, except that it
does not check that <code>index</code> is in bounds.</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.slice.html#method.get_unchecked"><code>slice::get_unchecked</code></a></p>
<h6 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h6>
<p>You must ensure that <code>index</code> is within bounds (within the range <code>0 .. self.len()</code>), or this method will introduce memory safety and/or
undefined behavior.</p>
<p>It is library-level undefined behavior to index beyond the length of any
bit-slice, even if you <strong>know</strong> that the offset remains within an
allocation as measured by Rust or LLVM.</p>
<h6 id="examples-15"><a class="doc-anchor" href="#examples-15">§</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">0b0001_0010u8</span>;
<span class="kw">let </span>bits = <span class="kw-2">&amp;</span>data.view_bits::&lt;Lsb0&gt;()[.. <span class="number">3</span>];
<span class="kw">unsafe </span>{
<span class="macro">assert!</span>(bits.get_unchecked(<span class="number">1</span>));
<span class="macro">assert!</span>(bits.get_unchecked(<span class="number">4</span>));
}</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.get_unchecked_mut" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.get_unchecked_mut" class="fn">get_unchecked_mut</a>&lt;'a, I&gt;(
&amp;'a mut self,
index: I,
) -&gt; &lt;I as BitSliceIndex&lt;'a, T, O&gt;&gt;::Mut<div class="where">where
I: BitSliceIndex&lt;'a, T, O&gt;,</div></h4></section></summary><div class="docblock"><p>Gets a mutable reference to a single bit or a subsection of the
bit-slice, depending on the type of <code>index</code>.</p>
<p>This has the same arguments and behavior as <a href="struct.BitSlice.html#method.get_mut" title="method common_base::bit_vec::prelude::BitSlice::get_mut"><code>.get_mut()</code></a>, except that
it does not check that <code>index</code> is in bounds.</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.slice.html#method.get_unchecked_mut"><code>slice::get_unchecked_mut</code></a></p>
<h6 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h6>
<p>You must ensure that <code>index</code> is within bounds (within the range <code>0 .. self.len()</code>), or this method will introduce memory safety and/or
undefined behavior.</p>
<p>It is library-level undefined behavior to index beyond the length of any
bit-slice, even if you <strong>know</strong> that the offset remains within an
allocation as measured by Rust or LLVM.</p>
<h6 id="examples-16"><a class="doc-anchor" href="#examples-16">§</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>bits = <span class="kw-2">&amp;mut </span>data.view_bits_mut::&lt;Lsb0&gt;()[.. <span class="number">3</span>];
<span class="kw">unsafe </span>{
bits.get_unchecked_mut(<span class="number">1</span>).commit(<span class="bool-val">true</span>);
bits.get_unchecked_mut(<span class="number">4 </span>.. <span class="number">6</span>).fill(<span class="bool-val">true</span>);
}
<span class="macro">assert_eq!</span>(data, <span class="number">0b0011_0010</span>);</code></pre></div></div></details><section id="method.as_ptr" class="method"><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fn">as_ptr</a>(&amp;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><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>.as_bitptr()</code> instead</span></div></span><section id="method.as_mut_ptr" class="method"><h4 class="code-header">pub fn <a href="#method.as_mut_ptr" class="fn">as_mut_ptr</a>(&amp;mut 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><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>.as_mut_bitptr()</code> instead</span></div></span><details class="toggle method-toggle" open><summary><section id="method.as_ptr_range" class="method"><h4 class="code-header">pub fn <a href="#method.as_ptr_range" class="fn">as_ptr_range</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Const, T, O&gt;&gt;</h4></section></summary><div class="docblock"><p>Produces a range of bit-pointers to each bit in the bit-slice.</p>
<p>This is a standard-library range, which has no real functionality for
pointer types. You should prefer <a href="struct.BitSlice.html#method.as_bitptr_range" title="method common_base::bit_vec::prelude::BitSlice::as_bitptr_range"><code>.as_bitptr_range()</code></a> instead, as it
produces a custom structure that provides expected ranging
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.slice.html#method.as_ptr_range"><code>slice::as_ptr_range</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_ptr_range" class="method"><h4 class="code-header">pub fn <a href="#method.as_mut_ptr_range" class="fn">as_mut_ptr_range</a>(&amp;mut self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;<a class="struct" href="struct.BitPtr.html" title="struct common_base::bit_vec::prelude::BitPtr">BitPtr</a>&lt;Mut, T, O&gt;&gt;</h4></section></summary><div class="docblock"><p>Produces a range of mutable bit-pointers to each bit in the bit-slice.</p>
<p>This is a standard-library range, which has no real functionality for
pointer types. You should prefer <a href="struct.BitSlice.html#method.as_mut_bitptr_range" title="method common_base::bit_vec::prelude::BitSlice::as_mut_bitptr_range"><code>.as_mut_bitptr_range()</code></a> instead, as
it produces a custom structure that provides expected ranging
functionality.</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.slice.html#method.as_mut_ptr_range"><code>slice::as_mut_ptr_range</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.swap" class="method"><h4 class="code-header">pub fn <a href="#method.swap" class="fn">swap</a>(&amp;mut self, a: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, b: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Exchanges the bit values at two indices.</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.slice.html#method.swap"><code>slice::swap</code></a></p>
<h6 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h6>
<p>This panics if either <code>a</code> or <code>b</code> are out of bounds.</p>
<h6 id="examples-17"><a class="doc-anchor" href="#examples-17">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>, <span class="number">1</span>];
bits.swap(<span class="number">0</span>, <span class="number">1</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.reverse" class="method"><h4 class="code-header">pub fn <a href="#method.reverse" class="fn">reverse</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Reverses the order of bits in a bit-slice.</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.slice.html#method.reverse"><code>slice::reverse</code></a></p>
<h6 id="examples-18"><a class="doc-anchor" href="#examples-18">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
bits.reverse();
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.iter" class="method"><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&amp;self) -&gt; Iter&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Produces an iterator over each bit in the bit-slice.</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.slice.html#method.iter"><code>slice::iter</code></a></p>
<h6 id="api-differences-10"><a class="doc-anchor" href="#api-differences-10">§</a>API Differences</h6>
<p>This iterator yields proxy-reference structures, not <code>&amp;bool</code>. It can be
adapted to yield <code>&amp;bool</code> with the <a href="crate::slice::Iter::by_refs"><code>.by_refs()</code></a> method, or <code>bool</code> with
<a href="crate::slice::Iter::by_vals"><code>.by_vals()</code></a>.</p>
<p>This iterator, and its adapters, are fast. Do not try to be more clever
than them by abusing <code>.as_bitptr_range()</code>.</p>
<h6 id="examples-19"><a class="doc-anchor" href="#examples-19">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="kw">let </span><span class="kw-2">mut </span>iter = bits.iter();
<span class="macro">assert!</span>(!iter.next().unwrap());
<span class="macro">assert!</span>( iter.next().unwrap());
<span class="macro">assert!</span>( iter.next_back().unwrap());
<span class="macro">assert!</span>(!iter.next_back().unwrap());
<span class="macro">assert!</span>( iter.next().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.iter_mut" class="method"><h4 class="code-header">pub fn <a href="#method.iter_mut" class="fn">iter_mut</a>(&amp;mut self) -&gt; IterMut&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Produces a mutable iterator over each bit in the bit-slice.</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.slice.html#method.iter_mut"><code>slice::iter_mut</code></a></p>
<h6 id="api-differences-11"><a class="doc-anchor" href="#api-differences-11">§</a>API Differences</h6>
<p>This iterator yields proxy-reference structures, not <code>&amp;mut bool</code>. In
addition, it marks each proxy as alias-tainted.</p>
<p>If you are using this in an ordinary loop and <strong>not</strong> keeping multiple
yielded proxy-references alive at the same scope, you may use the
<a href="crate::slice::IterMut::remove_alias"><code>.remove_alias()</code></a> adapter to undo the alias marking.</p>
<p>This iterator is fast. Do not try to be more clever than it by abusing
<code>.as_mut_bitptr_range()</code>.</p>
<h6 id="examples-20"><a class="doc-anchor" href="#examples-20">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>; <span class="number">4</span>];
<span class="kw">let </span><span class="kw-2">mut </span>iter = bits.iter_mut();
iter.nth(<span class="number">1</span>).unwrap().commit(<span class="bool-val">true</span>); <span class="comment">// index 1
</span>iter.next_back().unwrap().commit(<span class="bool-val">true</span>); <span class="comment">// index 3
</span><span class="macro">assert!</span>(iter.next().is_some()); <span class="comment">// index 2
</span><span class="macro">assert!</span>(iter.next().is_none()); <span class="comment">// complete
</span><span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.windows" class="method"><h4 class="code-header">pub fn <a href="#method.windows" class="fn">windows</a>(&amp;self, size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; Windows&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Iterates over consecutive windowing subslices in a bit-slice.</p>
<p>Windows are overlapping views of the bit-slice. Each window advances one
bit from the previous, so in a bit-slice <code>[A, B, C, D, E]</code>, calling
<code>.windows(3)</code> will yield <code>[A, B, C]</code>, <code>[B, C, D]</code>, and <code>[C, D, E]</code>.</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.slice.html#method.windows"><code>slice::windows</code></a></p>
<h6 id="panics-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h6>
<p>This panics if <code>size</code> is <code>0</code>.</p>
<h6 id="examples-21"><a class="doc-anchor" href="#examples-21">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="kw">let </span><span class="kw-2">mut </span>iter = bits.windows(<span class="number">3</span>);
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>]));
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>]));
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>]));
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.chunks" class="method"><h4 class="code-header">pub fn <a href="#method.chunks" class="fn">chunks</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; Chunks&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Iterates over non-overlapping subslices of a bit-slice.</p>
<p>Unlike <code>.windows()</code>, the subslices this yields do not overlap with each
other. If <code>self.len()</code> is not an even multiple of <code>chunk_size</code>, then the
last chunk yielded will be shorter.</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.slice.html#method.chunks"><code>slice::chunks</code></a></p>
<h6 id="sibling-methods"><a class="doc-anchor" href="#sibling-methods">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.chunks_mut" title="method common_base::bit_vec::prelude::BitSlice::chunks_mut"><code>.chunks_mut()</code></a> has the same division logic, but each yielded
bit-slice is mutable.</li>
<li><a href="struct.BitSlice.html#method.chunks_exact" title="method common_base::bit_vec::prelude::BitSlice::chunks_exact"><code>.chunks_exact()</code></a> does not yield the final chunk if it is shorter
than <code>chunk_size</code>.</li>
<li><a href="struct.BitSlice.html#method.rchunks" title="method common_base::bit_vec::prelude::BitSlice::rchunks"><code>.rchunks()</code></a> iterates from the back of the bit-slice to the front,
with the final, possibly-shorter, segment at the front edge.</li>
</ul>
<h6 id="panics-2"><a class="doc-anchor" href="#panics-2">§</a>Panics</h6>
<p>This panics if <code>chunk_size</code> is <code>0</code>.</p>
<h6 id="examples-22"><a class="doc-anchor" href="#examples-22">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="kw">let </span><span class="kw-2">mut </span>iter = bits.chunks(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]));
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>]));
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">1</span>]));
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.chunks_mut" class="method"><h4 class="code-header">pub fn <a href="#method.chunks_mut" class="fn">chunks_mut</a>(&amp;mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; ChunksMut&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Iterates over non-overlapping mutable subslices of a bit-slice.</p>
<p>Iterators do not require that each yielded item is destroyed before the
next is produced. This means that each bit-slice yielded must be marked
as aliased. If you are using this in a loop that does not collect
multiple yielded subslices for the same scope, then you can remove the
alias marking by calling the (<code>unsafe</code>) method <a href="crate::slice::ChunksMut::remove_alias"><code>.remove_alias()</code></a> on
the iterator.</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.slice.html#method.chunks_mut"><code>slice::chunks_mut</code></a></p>
<h6 id="sibling-methods-1"><a class="doc-anchor" href="#sibling-methods-1">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.chunks" title="method common_base::bit_vec::prelude::BitSlice::chunks"><code>.chunks()</code></a> has the same division logic, but each yielded bit-slice
is immutable.</li>
<li><a href="struct.BitSlice.html#method.chunks_exact_mut" title="method common_base::bit_vec::prelude::BitSlice::chunks_exact_mut"><code>.chunks_exact_mut()</code></a> does not yield the final chunk if it is
shorter than <code>chunk_size</code>.</li>
<li><a href="struct.BitSlice.html#method.rchunks_mut" title="method common_base::bit_vec::prelude::BitSlice::rchunks_mut"><code>.rchunks_mut()</code></a> iterates from the back of the bit-slice to the
front, with the final, possibly-shorter, segment at the front edge.</li>
</ul>
<h6 id="panics-3"><a class="doc-anchor" href="#panics-3">§</a>Panics</h6>
<p>This panics if <code>chunk_size</code> is <code>0</code>.</p>
<h6 id="examples-23"><a class="doc-anchor" href="#examples-23">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span>u8, Msb0; <span class="number">0</span>; <span class="number">5</span>];
<span class="kw">for </span>(idx, chunk) <span class="kw">in unsafe </span>{
bits.chunks_mut(<span class="number">2</span>).remove_alias()
}.enumerate() {
chunk.store(idx + <span class="number">1</span>);
}
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>]);
<span class="comment">// ^^^^ ^^^^ ^</span></code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.chunks_exact" class="method"><h4 class="code-header">pub fn <a href="#method.chunks_exact" class="fn">chunks_exact</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; ChunksExact&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Iterates over non-overlapping subslices of a bit-slice.</p>
<p>If <code>self.len()</code> is not an even multiple of <code>chunk_size</code>, then the last
few bits are not yielded by the iterator at all. They can be accessed
with the <a href="crate::slice::ChunksExact::remainder"><code>.remainder()</code></a> method if the iterator is bound to a name.</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.slice.html#method.chunks_exact"><code>slice::chunks_exact</code></a></p>
<h6 id="sibling-methods-2"><a class="doc-anchor" href="#sibling-methods-2">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.chunks" title="method common_base::bit_vec::prelude::BitSlice::chunks"><code>.chunks()</code></a> yields any leftover bits at the end as a shorter chunk
during iteration.</li>
<li><a href="struct.BitSlice.html#method.chunks_exact_mut" title="method common_base::bit_vec::prelude::BitSlice::chunks_exact_mut"><code>.chunks_exact_mut()</code></a> has the same division logic, but each yielded
bit-slice is mutable.</li>
<li><a href="struct.BitSlice.html#method.rchunks_exact" title="method common_base::bit_vec::prelude::BitSlice::rchunks_exact"><code>.rchunks_exact()</code></a> iterates from the back of the bit-slice to the
front, with the unyielded remainder segment at the front edge.</li>
</ul>
<h6 id="panics-4"><a class="doc-anchor" href="#panics-4">§</a>Panics</h6>
<p>This panics if <code>chunk_size</code> is <code>0</code>.</p>
<h6 id="examples-24"><a class="doc-anchor" href="#examples-24">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="kw">let </span><span class="kw-2">mut </span>iter = bits.chunks_exact(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]));
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>]));
<span class="macro">assert!</span>(iter.next().is_none());
<span class="macro">assert_eq!</span>(iter.remainder(), <span class="macro">bits!</span>[<span class="number">1</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.chunks_exact_mut" class="method"><h4 class="code-header">pub fn <a href="#method.chunks_exact_mut" class="fn">chunks_exact_mut</a>(
&amp;mut self,
chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
) -&gt; ChunksExactMut&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Iterates over non-overlapping mutable subslices of a bit-slice.</p>
<p>If <code>self.len()</code> is not an even multiple of <code>chunk_size</code>, then the last
few bits are not yielded by the iterator at all. They can be accessed
with the <a href="crate::slice::ChunksExactMut::into_remainder"><code>.into_remainder()</code></a> method if the iterator is bound to a
name.</p>
<p>Iterators do not require that each yielded item is destroyed before the
next is produced. This means that each bit-slice yielded must be marked
as aliased. If you are using this in a loop that does not collect
multiple yielded subslices for the same scope, then you can remove the
alias marking by calling the (<code>unsafe</code>) method <a href="crate::slice::ChunksExactMut::remove_alias"><code>.remove_alias()</code></a> on
the iterator.</p>
<h6 id="original-27"><a class="doc-anchor" href="#original-27">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.chunks_exact_mut"><code>slice::chunks_exact_mut</code></a></p>
<h6 id="sibling-methods-3"><a class="doc-anchor" href="#sibling-methods-3">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.chunks_mut" title="method common_base::bit_vec::prelude::BitSlice::chunks_mut"><code>.chunks_mut()</code></a> yields any leftover bits at the end as a shorter
chunk during iteration.</li>
<li><a href="struct.BitSlice.html#method.chunks_exact" title="method common_base::bit_vec::prelude::BitSlice::chunks_exact"><code>.chunks_exact()</code></a> has the same division logic, but each yielded
bit-slice is immutable.</li>
<li><a href="struct.BitSlice.html#method.rchunks_exact_mut" title="method common_base::bit_vec::prelude::BitSlice::rchunks_exact_mut"><code>.rchunks_exact_mut()</code></a> iterates from the back of the bit-slice
forwards, with the unyielded remainder segment at the front edge.</li>
</ul>
<h6 id="panics-5"><a class="doc-anchor" href="#panics-5">§</a>Panics</h6>
<p>This panics if <code>chunk_size</code> is <code>0</code>.</p>
<h6 id="examples-25"><a class="doc-anchor" href="#examples-25">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span>u8, Msb0; <span class="number">0</span>; <span class="number">5</span>];
<span class="kw">let </span><span class="kw-2">mut </span>iter = bits.chunks_exact_mut(<span class="number">2</span>);
<span class="kw">for </span>(idx, chunk) <span class="kw">in </span>iter.by_ref().enumerate() {
chunk.store(idx + <span class="number">1</span>);
}
iter.into_remainder().store(<span class="number">1u8</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>]);
<span class="comment">// remainder ^</span></code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks" class="method"><h4 class="code-header">pub fn <a href="#method.rchunks" class="fn">rchunks</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; RChunks&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Iterates over non-overlapping subslices of a bit-slice, from the back
edge.</p>
<p>Unlike <code>.chunks()</code>, this aligns its chunks to the back edge of <code>self</code>.
If <code>self.len()</code> is not an even multiple of <code>chunk_size</code>, then the
leftover partial chunk is <code>self[0 .. len % chunk_size]</code>.</p>
<h6 id="original-28"><a class="doc-anchor" href="#original-28">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks"><code>slice::rchunks</code></a></p>
<h6 id="sibling-methods-4"><a class="doc-anchor" href="#sibling-methods-4">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.rchunks_mut" title="method common_base::bit_vec::prelude::BitSlice::rchunks_mut"><code>.rchunks_mut()</code></a> has the same division logic, but each yielded
bit-slice is mutable.</li>
<li><a href="struct.BitSlice.html#method.rchunks_exact" title="method common_base::bit_vec::prelude::BitSlice::rchunks_exact"><code>.rchunks_exact()</code></a> does not yield the final chunk if it is shorter
than <code>chunk_size</code>.</li>
<li><a href="struct.BitSlice.html#method.chunks" title="method common_base::bit_vec::prelude::BitSlice::chunks"><code>.chunks()</code></a> iterates from the front of the bit-slice to the back,
with the final, possibly-shorter, segment at the back edge.</li>
</ul>
<h6 id="panics-6"><a class="doc-anchor" href="#panics-6">§</a>Panics</h6>
<p>This panics if <code>chunk_size</code> is <code>0</code>.</p>
<h6 id="examples-26"><a class="doc-anchor" href="#examples-26">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="kw">let </span><span class="kw-2">mut </span>iter = bits.rchunks(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]));
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>]));
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">0</span>]));
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks_mut" class="method"><h4 class="code-header">pub fn <a href="#method.rchunks_mut" class="fn">rchunks_mut</a>(&amp;mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; RChunksMut&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Iterates over non-overlapping mutable subslices of a bit-slice, from the
back edge.</p>
<p>Unlike <code>.chunks_mut()</code>, this aligns its chunks to the back edge of
<code>self</code>. If <code>self.len()</code> is not an even multiple of <code>chunk_size</code>, then
the leftover partial chunk is <code>self[0 .. len % chunk_size]</code>.</p>
<p>Iterators do not require that each yielded item is destroyed before the
next is produced. This means that each bit-slice yielded must be marked
as aliased. If you are using this in a loop that does not collect
multiple yielded values for the same scope, then you can remove the
alias marking by calling the (<code>unsafe</code>) method <a href="crate::slice::RChunksMut::remove_alias"><code>.remove_alias()</code></a> on
the iterator.</p>
<h6 id="original-29"><a class="doc-anchor" href="#original-29">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks_mut"><code>slice::rchunks_mut</code></a></p>
<h6 id="sibling-methods-5"><a class="doc-anchor" href="#sibling-methods-5">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.rchunks" title="method common_base::bit_vec::prelude::BitSlice::rchunks"><code>.rchunks()</code></a> has the same division logic, but each yielded bit-slice
is immutable.</li>
<li><a href="struct.BitSlice.html#method.rchunks_exact_mut" title="method common_base::bit_vec::prelude::BitSlice::rchunks_exact_mut"><code>.rchunks_exact_mut()</code></a> does not yield the final chunk if it is
shorter than <code>chunk_size</code>.</li>
<li><a href="struct.BitSlice.html#method.chunks_mut" title="method common_base::bit_vec::prelude::BitSlice::chunks_mut"><code>.chunks_mut()</code></a> iterates from the front of the bit-slice to the
back, with the final, possibly-shorter, segment at the back edge.</li>
</ul>
<h6 id="examples-27"><a class="doc-anchor" href="#examples-27">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span>u8, Msb0; <span class="number">0</span>; <span class="number">5</span>];
<span class="kw">for </span>(idx, chunk) <span class="kw">in unsafe </span>{
bits.rchunks_mut(<span class="number">2</span>).remove_alias()
}.enumerate() {
chunk.store(idx + <span class="number">1</span>);
}
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>]);
<span class="comment">// remainder ^ ^^^^ ^^^^</span></code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks_exact" class="method"><h4 class="code-header">pub fn <a href="#method.rchunks_exact" class="fn">rchunks_exact</a>(&amp;self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; RChunksExact&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Iterates over non-overlapping subslices of a bit-slice, from the back
edge.</p>
<p>If <code>self.len()</code> is not an even multiple of <code>chunk_size</code>, then the first
few bits are not yielded by the iterator at all. They can be accessed
with the <a href="crate::slice::RChunksExact::remainder"><code>.remainder()</code></a> method if the iterator is bound to a name.</p>
<h6 id="original-30"><a class="doc-anchor" href="#original-30">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks_exact"><code>slice::rchunks_exact</code></a></p>
<h6 id="sibling-methods-6"><a class="doc-anchor" href="#sibling-methods-6">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.rchunks" title="method common_base::bit_vec::prelude::BitSlice::rchunks"><code>.rchunks()</code></a> yields any leftover bits at the front as a shorter
chunk during iteration.</li>
<li><a href="struct.BitSlice.html#method.rchunks_exact_mut" title="method common_base::bit_vec::prelude::BitSlice::rchunks_exact_mut"><code>.rchunks_exact_mut()</code></a> has the same division logic, but each yielded
bit-slice is mutable.</li>
<li><a href="struct.BitSlice.html#method.chunks_exact" title="method common_base::bit_vec::prelude::BitSlice::chunks_exact"><code>.chunks_exact()</code></a> iterates from the front of the bit-slice to the
back, with the unyielded remainder segment at the back edge.</li>
</ul>
<h6 id="panics-7"><a class="doc-anchor" href="#panics-7">§</a>Panics</h6>
<p>This panics if <code>chunk_size</code> is <code>0</code>.</p>
<h6 id="examples-28"><a class="doc-anchor" href="#examples-28">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="kw">let </span><span class="kw-2">mut </span>iter = bits.rchunks_exact(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]));
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>]));
<span class="macro">assert!</span>(iter.next().is_none());
<span class="macro">assert_eq!</span>(iter.remainder(), <span class="macro">bits!</span>[<span class="number">0</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks_exact_mut" class="method"><h4 class="code-header">pub fn <a href="#method.rchunks_exact_mut" class="fn">rchunks_exact_mut</a>(
&amp;mut self,
chunk_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
) -&gt; RChunksExactMut&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Iterates over non-overlapping mutable subslices of a bit-slice, from the
back edge.</p>
<p>If <code>self.len()</code> is not an even multiple of <code>chunk_size</code>, then the first
few bits are not yielded by the iterator at all. They can be accessed
with the <a href="crate::slice::RChunksExactMut::into_remainder"><code>.into_remainder()</code></a> method if the iterator is bound to a
name.</p>
<p>Iterators do not require that each yielded item is destroyed before the
next is produced. This means that each bit-slice yielded must be marked
as aliased. If you are using this in a loop that does not collect
multiple yielded subslices for the same scope, then you can remove the
alias marking by calling the (<code>unsafe</code>) method <a href="crate::slice::RChunksExactMut::remove_alias"><code>.remove_alias()</code></a> on
the iterator.</p>
<h6 id="sibling-methods-7"><a class="doc-anchor" href="#sibling-methods-7">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.rchunks_mut" title="method common_base::bit_vec::prelude::BitSlice::rchunks_mut"><code>.rchunks_mut()</code></a> yields any leftover bits at the front as a shorter
chunk during iteration.</li>
<li><a href="struct.BitSlice.html#method.rchunks_exact" title="method common_base::bit_vec::prelude::BitSlice::rchunks_exact"><code>.rchunks_exact()</code></a> has the same division logic, but each yielded
bit-slice is immutable.</li>
<li><a href="struct.BitSlice.html#method.chunks_exact_mut" title="method common_base::bit_vec::prelude::BitSlice::chunks_exact_mut"><code>.chunks_exact_mut()</code></a> iterates from the front of the bit-slice
backwards, with the unyielded remainder segment at the back edge.</li>
</ul>
<h6 id="panics-8"><a class="doc-anchor" href="#panics-8">§</a>Panics</h6>
<p>This panics if <code>chunk_size</code> is <code>0</code>.</p>
<h6 id="examples-29"><a class="doc-anchor" href="#examples-29">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span>u8, Msb0; <span class="number">0</span>; <span class="number">5</span>];
<span class="kw">let </span><span class="kw-2">mut </span>iter = bits.rchunks_exact_mut(<span class="number">2</span>);
<span class="kw">for </span>(idx, chunk) <span class="kw">in </span>iter.by_ref().enumerate() {
chunk.store(idx + <span class="number">1</span>);
}
iter.into_remainder().store(<span class="number">1u8</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>]);
<span class="comment">// remainder ^</span></code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.split_at" class="method"><h4 class="code-header">pub fn <a href="#method.split_at" class="fn">split_at</a>(&amp;self, mid: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; (&amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;, &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;)</h4></section></summary><div class="docblock"><p>Splits a bit-slice in two parts at an index.</p>
<p>The returned bit-slices are <code>self[.. mid]</code> and <code>self[mid ..]</code>. <code>mid</code> is
included in the right bit-slice, not the left.</p>
<p>If <code>mid</code> is <code>0</code> then the left bit-slice is empty; if it is <code>self.len()</code>
then the right bit-slice is empty.</p>
<p>This method guarantees that even when either partition is empty, the
encoded bit-pointer values of the bit-slice references is <code>&amp;self[0]</code> and
<code>&amp;self[mid]</code>.</p>
<h6 id="original-31"><a class="doc-anchor" href="#original-31">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.split_at"><code>slice::split_at</code></a></p>
<h6 id="panics-9"><a class="doc-anchor" href="#panics-9">§</a>Panics</h6>
<p>This panics if <code>mid</code> is greater than <code>self.len()</code>. It is allowed to be
equal to the length, in which case the right bit-slice is simply empty.</p>
<h6 id="examples-30"><a class="doc-anchor" href="#examples-30">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>];
<span class="kw">let </span>base = bits.as_bitptr();
<span class="kw">let </span>(a, b) = bits.split_at(<span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="kw">unsafe </span>{ a.as_bitptr().offset_from(base) }, <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="kw">unsafe </span>{ b.as_bitptr().offset_from(base) }, <span class="number">0</span>);
<span class="kw">let </span>(a, b) = bits.split_at(<span class="number">6</span>);
<span class="macro">assert_eq!</span>(<span class="kw">unsafe </span>{ b.as_bitptr().offset_from(base) }, <span class="number">6</span>);
<span class="kw">let </span>(a, b) = bits.split_at(<span class="number">3</span>);
<span class="macro">assert_eq!</span>(a, <span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">3</span>]);
<span class="macro">assert_eq!</span>(b, <span class="macro">bits!</span>[<span class="number">1</span>; <span class="number">3</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_mut" class="method"><h4 class="code-header">pub fn <a href="#method.split_at_mut" class="fn">split_at_mut</a>(
&amp;mut self,
mid: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
) -&gt; (&amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&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.Alias" title="type common_base::bit_vec::prelude::BitStore::Alias">Alias</a>, O&gt;, &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&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.Alias" title="type common_base::bit_vec::prelude::BitStore::Alias">Alias</a>, O&gt;)</h4></section></summary><div class="docblock"><p>Splits a mutable bit-slice in two parts at an index.</p>
<p>The returned bit-slices are <code>self[.. mid]</code> and <code>self[mid ..]</code>. <code>mid</code> is
included in the right bit-slice, not the left.</p>
<p>If <code>mid</code> is <code>0</code> then the left bit-slice is empty; if it is <code>self.len()</code>
then the right bit-slice is empty.</p>
<p>This method guarantees that even when either partition is empty, the
encoded bit-pointer values of the bit-slice references is <code>&amp;self[0]</code> and
<code>&amp;self[mid]</code>.</p>
<h6 id="original-32"><a class="doc-anchor" href="#original-32">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.split_at_mut"><code>slice::split_at_mut</code></a></p>
<h6 id="api-differences-12"><a class="doc-anchor" href="#api-differences-12">§</a>API Differences</h6>
<p>The end bits of the left half and the start bits of the right half might
be stored in the same memory element. In order to avoid breaking
<code>bitvec</code>s memory-safety guarantees, both bit-slices are marked as
<code>T::Alias</code>. This marking allows them to be used without interfering with
each other when they interact with memory.</p>
<h6 id="panics-10"><a class="doc-anchor" href="#panics-10">§</a>Panics</h6>
<p>This panics if <code>mid</code> is greater than <code>self.len()</code>. It is allowed to be
equal to the length, in which case the right bit-slice is simply empty.</p>
<h6 id="examples-31"><a class="doc-anchor" href="#examples-31">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span>u8, Msb0; <span class="number">0</span>; <span class="number">6</span>];
<span class="kw">let </span>base = bits.as_mut_bitptr();
<span class="kw">let </span>(a, b) = bits.split_at_mut(<span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="kw">unsafe </span>{ a.as_mut_bitptr().offset_from(base) }, <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="kw">unsafe </span>{ b.as_mut_bitptr().offset_from(base) }, <span class="number">0</span>);
<span class="kw">let </span>(a, b) = bits.split_at_mut(<span class="number">6</span>);
<span class="macro">assert_eq!</span>(<span class="kw">unsafe </span>{ b.as_mut_bitptr().offset_from(base) }, <span class="number">6</span>);
<span class="kw">let </span>(a, b) = bits.split_at_mut(<span class="number">3</span>);
a.store(<span class="number">3</span>);
b.store(<span class="number">5</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.split" class="method"><h4 class="code-header">pub fn <a href="#method.split" class="fn">split</a>&lt;F&gt;(&amp;self, pred: F) -&gt; Split&lt;'_, T, O, F&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, &amp;<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>,</div></h4></section></summary><div class="docblock"><p>Iterates over subslices separated by bits that match a predicate. The
matched bit is <em>not</em> contained in the yielded bit-slices.</p>
<h6 id="original-33"><a class="doc-anchor" href="#original-33">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.split"><code>slice::split</code></a></p>
<h6 id="api-differences-13"><a class="doc-anchor" href="#api-differences-13">§</a>API Differences</h6>
<p>The predicate function receives the index being tested as well as the
bit value at that index. This allows the predicate to have more than one
bit of information about the bit-slice being traversed.</p>
<h6 id="sibling-methods-8"><a class="doc-anchor" href="#sibling-methods-8">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.split_mut" title="method common_base::bit_vec::prelude::BitSlice::split_mut"><code>.split_mut()</code></a> has the same splitting logic, but each yielded
bit-slice is mutable.</li>
<li><a href="struct.BitSlice.html#method.split_inclusive" title="method common_base::bit_vec::prelude::BitSlice::split_inclusive"><code>.split_inclusive()</code></a> includes the matched bit in the yielded
bit-slice.</li>
<li><a href="struct.BitSlice.html#method.rsplit" title="method common_base::bit_vec::prelude::BitSlice::rsplit"><code>.rsplit()</code></a> iterates from the back of the bit-slice instead of the
front.</li>
<li><a href="struct.BitSlice.html#method.splitn" title="method common_base::bit_vec::prelude::BitSlice::splitn"><code>.splitn()</code></a> times out after <code>n</code> yields.</li>
</ul>
<h6 id="examples-32"><a class="doc-anchor" href="#examples-32">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="comment">// ^
</span><span class="kw">let </span><span class="kw-2">mut </span>iter = bits.split(|pos, _bit| pos % <span class="number">3 </span>== <span class="number">2</span>);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>]);
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
<p>If the first bit is matched, then an empty bit-slice will be the first
item yielded by the iterator. Similarly, if the last bit in the
bit-slice matches, then an empty bit-slice will be the last item
yielded.</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="comment">// ^
</span><span class="kw">let </span><span class="kw-2">mut </span>iter = bits.split(|_pos, bit| <span class="kw-2">*</span>bit);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">2</span>]);
<span class="macro">assert!</span>(iter.next().unwrap().is_empty());
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
<p>If two matched bits are directly adjacent, then an empty bit-slice will
be yielded between them:</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>bits = <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="comment">// ^ ^
</span><span class="kw">let </span><span class="kw-2">mut </span>iter = bits.split(|_pos, bit| !<span class="kw-2">*</span>bit);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">1</span>]);
<span class="macro">assert!</span>(iter.next().unwrap().is_empty());
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">1</span>]);
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.split_mut" class="method"><h4 class="code-header">pub fn <a href="#method.split_mut" class="fn">split_mut</a>&lt;F&gt;(&amp;mut self, pred: F) -&gt; SplitMut&lt;'_, T, O, F&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, &amp;<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>,</div></h4></section></summary><div class="docblock"><p>Iterates over mutable subslices separated by bits that match a
predicate. The matched bit is <em>not</em> contained in the yielded bit-slices.</p>
<p>Iterators do not require that each yielded item is destroyed before the
next is produced. This means that each bit-slice yielded must be marked
as aliased. If you are using this in a loop that does not collect
multiple yielded subslices for the same scope, then you can remove the
alias marking by calling the (<code>unsafe</code>) method <a href="crate::slice::SplitMut::remove_alias"><code>.remove_alias()</code></a> on
the iterator.</p>
<h6 id="original-34"><a class="doc-anchor" href="#original-34">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.split_mut"><code>slice::split_mut</code></a></p>
<h6 id="api-differences-14"><a class="doc-anchor" href="#api-differences-14">§</a>API Differences</h6>
<p>The predicate function receives the index being tested as well as the
bit value at that index. This allows the predicate to have more than one
bit of information about the bit-slice being traversed.</p>
<h6 id="sibling-methods-9"><a class="doc-anchor" href="#sibling-methods-9">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.split" title="method common_base::bit_vec::prelude::BitSlice::split"><code>.split()</code></a> has the same splitting logic, but each yielded bit-slice
is immutable.</li>
<li><a href="struct.BitSlice.html#method.split_inclusive_mut" title="method common_base::bit_vec::prelude::BitSlice::split_inclusive_mut"><code>.split_inclusive_mut()</code></a> includes the matched bit in the yielded
bit-slice.</li>
<li><a href="struct.BitSlice.html#method.rsplit_mut" title="method common_base::bit_vec::prelude::BitSlice::rsplit_mut"><code>.rsplit_mut()</code></a> iterates from the back of the bit-slice instead of
the front.</li>
<li><a href="struct.BitSlice.html#method.splitn_mut" title="method common_base::bit_vec::prelude::BitSlice::splitn_mut"><code>.splitn_mut()</code></a> times out after <code>n</code> yields.</li>
</ul>
<h6 id="examples-33"><a class="doc-anchor" href="#examples-33">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="comment">// ^ ^
</span><span class="kw">for </span>group <span class="kw">in </span>bits.split_mut(|_pos, bit| <span class="kw-2">*</span>bit) {
group.set(<span class="number">0</span>, <span class="bool-val">true</span>);
}
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.split_inclusive" class="method"><h4 class="code-header">pub fn <a href="#method.split_inclusive" class="fn">split_inclusive</a>&lt;F&gt;(&amp;self, pred: F) -&gt; SplitInclusive&lt;'_, T, O, F&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, &amp;<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>,</div></h4></section></summary><div class="docblock"><p>Iterates over subslices separated by bits that match a predicate. Unlike
<code>.split()</code>, this <em>does</em> include the matching bit as the last bit in the
yielded bit-slice.</p>
<h6 id="original-35"><a class="doc-anchor" href="#original-35">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.split_inclusive"><code>slice::split_inclusive</code></a></p>
<h6 id="api-differences-15"><a class="doc-anchor" href="#api-differences-15">§</a>API Differences</h6>
<p>The predicate function receives the index being tested as well as the
bit value at that index. This allows the predicate to have more than one
bit of information about the bit-slice being traversed.</p>
<h6 id="sibling-methods-10"><a class="doc-anchor" href="#sibling-methods-10">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.split_inclusive_mut" title="method common_base::bit_vec::prelude::BitSlice::split_inclusive_mut"><code>.split_inclusive_mut()</code></a> has the same splitting logic, but each
yielded bit-slice is mutable.</li>
<li><a href="struct.BitSlice.html#method.split" title="method common_base::bit_vec::prelude::BitSlice::split"><code>.split()</code></a> does not include the matched bit in the yielded
bit-slice.</li>
</ul>
<h6 id="examples-34"><a class="doc-anchor" href="#examples-34">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="comment">// ^ ^
</span><span class="kw">let </span><span class="kw-2">mut </span>iter = bits.split_inclusive(|_pos, bit| <span class="kw-2">*</span>bit);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>]);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]);
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.split_inclusive_mut" class="method"><h4 class="code-header">pub fn <a href="#method.split_inclusive_mut" class="fn">split_inclusive_mut</a>&lt;F&gt;(
&amp;mut self,
pred: F,
) -&gt; SplitInclusiveMut&lt;'_, T, O, F&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, &amp;<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>,</div></h4></section></summary><div class="docblock"><p>Iterates over mutable subslices separated by bits that match a
predicate. Unlike <code>.split_mut()</code>, this <em>does</em> include the matching bit
as the last bit in the bit-slice.</p>
<p>Iterators do not require that each yielded item is destroyed before the
next is produced. This means that each bit-slice yielded must be marked
as aliased. If you are using this in a loop that does not collect
multiple yielded subslices for the same scope, then you can remove the
alias marking by calling the (<code>unsafe</code>) method <a href="crate::slice::SplitInclusiveMut::remove_alias"><code>.remove_alias()</code></a> on
the iterator.</p>
<h6 id="original-36"><a class="doc-anchor" href="#original-36">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.split_inclusive_mut"><code>slice::split_inclusive_mut</code></a></p>
<h6 id="api-differences-16"><a class="doc-anchor" href="#api-differences-16">§</a>API Differences</h6>
<p>The predicate function receives the index being tested as well as the
bit value at that index. This allows the predicate to have more than one
bit of information about the bit-slice being traversed.</p>
<h6 id="sibling-methods-11"><a class="doc-anchor" href="#sibling-methods-11">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.split_inclusive" title="method common_base::bit_vec::prelude::BitSlice::split_inclusive"><code>.split_inclusive()</code></a> has the same splitting logic, but each yielded
bit-slice is immutable.</li>
<li><a href="struct.BitSlice.html#method.split_mut" title="method common_base::bit_vec::prelude::BitSlice::split_mut"><code>.split_mut()</code></a> does not include the matched bit in the yielded
bit-slice.</li>
</ul>
<h6 id="examples-35"><a class="doc-anchor" href="#examples-35">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
<span class="comment">// ^
</span><span class="kw">for </span>group <span class="kw">in </span>bits.split_inclusive_mut(|pos, _bit| pos % <span class="number">3 </span>== <span class="number">2</span>) {
group.set(<span class="number">0</span>, <span class="bool-val">true</span>);
}
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.rsplit" class="method"><h4 class="code-header">pub fn <a href="#method.rsplit" class="fn">rsplit</a>&lt;F&gt;(&amp;self, pred: F) -&gt; RSplit&lt;'_, T, O, F&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, &amp;<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>,</div></h4></section></summary><div class="docblock"><p>Iterates over subslices separated by bits that match a predicate, from
the back edge. The matched bit is <em>not</em> contained in the yielded
bit-slices.</p>
<h6 id="original-37"><a class="doc-anchor" href="#original-37">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.rsplit"><code>slice::rsplit</code></a></p>
<h6 id="api-differences-17"><a class="doc-anchor" href="#api-differences-17">§</a>API Differences</h6>
<p>The predicate function receives the index being tested as well as the
bit value at that index. This allows the predicate to have more than one
bit of information about the bit-slice being traversed.</p>
<h6 id="sibling-methods-12"><a class="doc-anchor" href="#sibling-methods-12">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.rsplit_mut" title="method common_base::bit_vec::prelude::BitSlice::rsplit_mut"><code>.rsplit_mut()</code></a> has the same splitting logic, but each yielded
bit-slice is mutable.</li>
<li><a href="struct.BitSlice.html#method.split" title="method common_base::bit_vec::prelude::BitSlice::split"><code>.split()</code></a> iterates from the front of the bit-slice instead of the
back.</li>
<li><a href="struct.BitSlice.html#method.rsplitn" title="method common_base::bit_vec::prelude::BitSlice::rsplitn"><code>.rsplitn()</code></a> times out after <code>n</code> yields.</li>
</ul>
<h6 id="examples-36"><a class="doc-anchor" href="#examples-36">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="comment">// ^
</span><span class="kw">let </span><span class="kw-2">mut </span>iter = bits.rsplit(|pos, _bit| pos % <span class="number">3 </span>== <span class="number">2</span>);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>]);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]);
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
<p>If the last bit is matched, then an empty bit-slice will be the first
item yielded by the iterator. Similarly, if the first bit in the
bit-slice matches, then an empty bit-slice will be the last item
yielded.</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="comment">// ^
</span><span class="kw">let </span><span class="kw-2">mut </span>iter = bits.rsplit(|_pos, bit| <span class="kw-2">*</span>bit);
<span class="macro">assert!</span>(iter.next().unwrap().is_empty());
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">2</span>]);
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
<p>If two yielded bits are directly adjacent, then an empty bit-slice will
be yielded between them:</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>bits = <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="comment">// ^ ^
</span><span class="kw">let </span><span class="kw-2">mut </span>iter = bits.split(|_pos, bit| !<span class="kw-2">*</span>bit);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">1</span>]);
<span class="macro">assert!</span>(iter.next().unwrap().is_empty());
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">1</span>]);
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.rsplit_mut" class="method"><h4 class="code-header">pub fn <a href="#method.rsplit_mut" class="fn">rsplit_mut</a>&lt;F&gt;(&amp;mut self, pred: F) -&gt; RSplitMut&lt;'_, T, O, F&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, &amp;<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>,</div></h4></section></summary><div class="docblock"><p>Iterates over mutable subslices separated by bits that match a
predicate, from the back. The matched bit is <em>not</em> contained in the
yielded bit-slices.</p>
<p>Iterators do not require that each yielded item is destroyed before the
next is produced. This means that each bit-slice yielded must be marked
as aliased. If you are using this in a loop that does not collect
multiple yielded subslices for the same scope, then you can remove the
alias marking by calling the (<code>unsafe</code>) method <a href="crate::slice::RSplitMut::remove_alias"><code>.remove_alias()</code></a> on
the iterator.</p>
<h6 id="original-38"><a class="doc-anchor" href="#original-38">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.rsplit_mut"><code>slice::rsplit_mut</code></a></p>
<h6 id="api-differences-18"><a class="doc-anchor" href="#api-differences-18">§</a>API Differences</h6>
<p>The predicate function receives the index being tested as well as the
bit value at that index. This allows the predicate to have more than one
bit of information about the bit-slice being traversed.</p>
<h6 id="sibling-methods-13"><a class="doc-anchor" href="#sibling-methods-13">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.rsplit" title="method common_base::bit_vec::prelude::BitSlice::rsplit"><code>.rsplit()</code></a> has the same splitting logic, but each yielded bit-slice
is immutable.</li>
<li><a href="struct.BitSlice.html#method.split_mut" title="method common_base::bit_vec::prelude::BitSlice::split_mut"><code>.split_mut()</code></a> iterates from the front of the bit-slice to the back.</li>
<li><a href="struct.BitSlice.html#method.rsplitn_mut" title="method common_base::bit_vec::prelude::BitSlice::rsplitn_mut"><code>.rsplitn_mut()</code></a> iterates from the front of the bit-slice to the
back.</li>
</ul>
<h6 id="examples-37"><a class="doc-anchor" href="#examples-37">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="comment">// ^ ^
</span><span class="kw">for </span>group <span class="kw">in </span>bits.rsplit_mut(|_pos, bit| <span class="kw-2">*</span>bit) {
group.set(<span class="number">0</span>, <span class="bool-val">true</span>);
}
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.splitn" class="method"><h4 class="code-header">pub fn <a href="#method.splitn" class="fn">splitn</a>&lt;F&gt;(&amp;self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pred: F) -&gt; SplitN&lt;'_, T, O, F&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, &amp;<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>,</div></h4></section></summary><div class="docblock"><p>Iterates over subslices separated by bits that match a predicate, giving
up after yielding <code>n</code> times. The <code>n</code>th yield contains the rest of the
bit-slice. As with <code>.split()</code>, the yielded bit-slices do not contain the
matched bit.</p>
<h6 id="original-39"><a class="doc-anchor" href="#original-39">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.splitn"><code>slice::splitn</code></a></p>
<h6 id="api-differences-19"><a class="doc-anchor" href="#api-differences-19">§</a>API Differences</h6>
<p>The predicate function receives the index being tested as well as the
bit value at that index. This allows the predicate to have more than one
bit of information about the bit-slice being traversed.</p>
<h6 id="sibling-methods-14"><a class="doc-anchor" href="#sibling-methods-14">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.splitn_mut" title="method common_base::bit_vec::prelude::BitSlice::splitn_mut"><code>.splitn_mut()</code></a> has the same splitting logic, but each yielded
bit-slice is mutable.</li>
<li><a href="struct.BitSlice.html#method.rsplitn" title="method common_base::bit_vec::prelude::BitSlice::rsplitn"><code>.rsplitn()</code></a> iterates from the back of the bit-slice instead of the
front.</li>
<li><a href="struct.BitSlice.html#method.split" title="method common_base::bit_vec::prelude::BitSlice::split"><code>.split()</code></a> has the same splitting logic, but never times out.</li>
</ul>
<h6 id="examples-38"><a class="doc-anchor" href="#examples-38">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="kw">let </span><span class="kw-2">mut </span>iter = bits.splitn(<span class="number">2</span>, |_pos, bit| <span class="kw-2">*</span>bit);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>]);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>]);
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.splitn_mut" class="method"><h4 class="code-header">pub fn <a href="#method.splitn_mut" class="fn">splitn_mut</a>&lt;F&gt;(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pred: F) -&gt; SplitNMut&lt;'_, T, O, F&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, &amp;<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>,</div></h4></section></summary><div class="docblock"><p>Iterates over mutable subslices separated by bits that match a
predicate, giving up after yielding <code>n</code> times. The <code>n</code>th yield contains
the rest of the bit-slice. As with <code>.split_mut()</code>, the yielded
bit-slices do not contain the matched bit.</p>
<p>Iterators do not require that each yielded item is destroyed before the
next is produced. This means that each bit-slice yielded must be marked
as aliased. If you are using this in a loop that does not collect
multiple yielded subslices for the same scope, then you can remove the
alias marking by calling the (<code>unsafe</code>) method <a href="crate::slice::SplitNMut::remove_alias"><code>.remove_alias()</code></a> on
the iterator.</p>
<h6 id="original-40"><a class="doc-anchor" href="#original-40">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.splitn_mut"><code>slice::splitn_mut</code></a></p>
<h6 id="api-differences-20"><a class="doc-anchor" href="#api-differences-20">§</a>API Differences</h6>
<p>The predicate function receives the index being tested as well as the
bit value at that index. This allows the predicate to have more than one
bit of information about the bit-slice being traversed.</p>
<h6 id="sibling-methods-15"><a class="doc-anchor" href="#sibling-methods-15">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.splitn" title="method common_base::bit_vec::prelude::BitSlice::splitn"><code>.splitn()</code></a> has the same splitting logic, but each yielded bit-slice
is immutable.</li>
<li><a href="struct.BitSlice.html#method.rsplitn_mut" title="method common_base::bit_vec::prelude::BitSlice::rsplitn_mut"><code>.rsplitn_mut()</code></a> iterates from the back of the bit-slice instead of
the front.</li>
<li><a href="struct.BitSlice.html#method.split_mut" title="method common_base::bit_vec::prelude::BitSlice::split_mut"><code>.split_mut()</code></a> has the same splitting logic, but never times out.</li>
</ul>
<h6 id="examples-39"><a class="doc-anchor" href="#examples-39">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="kw">for </span>group <span class="kw">in </span>bits.splitn_mut(<span class="number">2</span>, |_pos, bit| <span class="kw-2">*</span>bit) {
group.set(<span class="number">0</span>, <span class="bool-val">true</span>);
}
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.rsplitn" class="method"><h4 class="code-header">pub fn <a href="#method.rsplitn" class="fn">rsplitn</a>&lt;F&gt;(&amp;self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pred: F) -&gt; RSplitN&lt;'_, T, O, F&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, &amp;<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>,</div></h4></section></summary><div class="docblock"><p>Iterates over mutable subslices separated by bits that match a
predicate from the back edge, giving up after yielding <code>n</code> times. The
<code>n</code>th yield contains the rest of the bit-slice. As with <code>.split_mut()</code>,
the yielded bit-slices do not contain the matched bit.</p>
<h6 id="original-41"><a class="doc-anchor" href="#original-41">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.rsplitn"><code>slice::rsplitn</code></a></p>
<h6 id="api-differences-21"><a class="doc-anchor" href="#api-differences-21">§</a>API Differences</h6>
<p>The predicate function receives the index being tested as well as the
bit value at that index. This allows the predicate to have more than one
bit of information about the bit-slice being traversed.</p>
<h6 id="sibling-methods-16"><a class="doc-anchor" href="#sibling-methods-16">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.rsplitn_mut" title="method common_base::bit_vec::prelude::BitSlice::rsplitn_mut"><code>.rsplitn_mut()</code></a> has the same splitting logic, but each yielded
bit-slice is mutable.</li>
<li><a href="struct.BitSlice.html#method.splitn" title="method common_base::bit_vec::prelude::BitSlice::splitn"><code>.splitn()</code></a>: iterates from the front of the bit-slice instead of the
back.</li>
<li><a href="struct.BitSlice.html#method.rsplit" title="method common_base::bit_vec::prelude::BitSlice::rsplit"><code>.rsplit()</code></a> has the same splitting logic, but never times out.</li>
</ul>
<h6 id="examples-40"><a class="doc-anchor" href="#examples-40">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="comment">// ^
</span><span class="kw">let </span><span class="kw-2">mut </span>iter = bits.rsplitn(<span class="number">2</span>, |_pos, bit| <span class="kw-2">*</span>bit);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>]);
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>]);
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.rsplitn_mut" class="method"><h4 class="code-header">pub fn <a href="#method.rsplitn_mut" class="fn">rsplitn_mut</a>&lt;F&gt;(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, pred: F) -&gt; RSplitNMut&lt;'_, T, O, F&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, &amp;<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>,</div></h4></section></summary><div class="docblock"><p>Iterates over mutable subslices separated by bits that match a
predicate from the back edge, giving up after yielding <code>n</code> times. The
<code>n</code>th yield contains the rest of the bit-slice. As with <code>.split_mut()</code>,
the yielded bit-slices do not contain the matched bit.</p>
<p>Iterators do not require that each yielded item is destroyed before the
next is produced. This means that each bit-slice yielded must be marked
as aliased. If you are using this in a loop that does not collect
multiple yielded subslices for the same scope, then you can remove the
alias marking by calling the (<code>unsafe</code>) method <a href="crate::slice::RSplitNMut::remove_alias"><code>.remove_alias()</code></a> on
the iterator.</p>
<h6 id="original-42"><a class="doc-anchor" href="#original-42">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.rsplitn_mut"><code>slice::rsplitn_mut</code></a></p>
<h6 id="api-differences-22"><a class="doc-anchor" href="#api-differences-22">§</a>API Differences</h6>
<p>The predicate function receives the index being tested as well as the
bit value at that index. This allows the predicate to have more than one
bit of information about the bit-slice being traversed.</p>
<h6 id="sibling-methods-17"><a class="doc-anchor" href="#sibling-methods-17">§</a>Sibling Methods</h6>
<ul>
<li><a href="struct.BitSlice.html#method.rsplitn" title="method common_base::bit_vec::prelude::BitSlice::rsplitn"><code>.rsplitn()</code></a> has the same splitting logic, but each yielded
bit-slice is immutable.</li>
<li><a href="struct.BitSlice.html#method.splitn_mut" title="method common_base::bit_vec::prelude::BitSlice::splitn_mut"><code>.splitn_mut()</code></a> iterates from the front of the bit-slice instead of
the back.</li>
<li><a href="struct.BitSlice.html#method.rsplit_mut" title="method common_base::bit_vec::prelude::BitSlice::rsplit_mut"><code>.rsplit_mut()</code></a> has the same splitting logic, but never times out.</li>
</ul>
<h6 id="examples-41"><a class="doc-anchor" href="#examples-41">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
<span class="kw">for </span>group <span class="kw">in </span>bits.rsplitn_mut(<span class="number">2</span>, |_idx, bit| <span class="kw-2">*</span>bit) {
group.set(<span class="number">0</span>, <span class="bool-val">true</span>);
}
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>]);
<span class="comment">// ^ group 2 ^ group 1</span></code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.contains" class="method"><h4 class="code-header">pub fn <a href="#method.contains" class="fn">contains</a>&lt;T2, O2&gt;(&amp;self, other: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T2, O2&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</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>Tests if the bit-slice contains the given sequence anywhere within it.</p>
<p>This scans over <code>self.windows(other.len())</code> until one of the windows
matches. The search key does not need to share type parameters with the
bit-slice being tested, as the comparison is bit-wise. However, sharing
type parameters will accelerate the comparison.</p>
<h6 id="original-43"><a class="doc-anchor" href="#original-43">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.contains"><code>slice::contains</code></a></p>
<h6 id="examples-42"><a class="doc-anchor" href="#examples-42">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>];
<span class="macro">assert!</span>( bits.contains(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>]));
<span class="macro">assert!</span>(!bits.contains(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>]));</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.starts_with" class="method"><h4 class="code-header">pub fn <a href="#method.starts_with" class="fn">starts_with</a>&lt;T2, O2&gt;(&amp;self, needle: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T2, O2&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</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>Tests if the bit-slice begins with the given sequence.</p>
<p>The search key does not need to share type parameters with the bit-slice
being tested, as the comparison is bit-wise. However, sharing type
parameters will accelerate the comparison.</p>
<h6 id="original-44"><a class="doc-anchor" href="#original-44">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.starts_with"><code>slice::starts_with</code></a></p>
<h6 id="examples-43"><a class="doc-anchor" href="#examples-43">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="macro">assert!</span>( bits.starts_with(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]));
<span class="macro">assert!</span>(!bits.starts_with(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>]));</code></pre></div>
<p>This always returns <code>true</code> if the needle is empty:</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="kw">let </span>empty = <span class="macro">bits!</span>[];
<span class="macro">assert!</span>(bits.starts_with(empty));
<span class="macro">assert!</span>(empty.starts_with(empty));</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.ends_with" class="method"><h4 class="code-header">pub fn <a href="#method.ends_with" class="fn">ends_with</a>&lt;T2, O2&gt;(&amp;self, needle: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T2, O2&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</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>Tests if the bit-slice ends with the given sequence.</p>
<p>The search key does not need to share type parameters with the bit-slice
being tested, as the comparison is bit-wise. However, sharing type
parameters will accelerate the comparison.</p>
<h6 id="original-45"><a class="doc-anchor" href="#original-45">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.ends_with"><code>slice::ends_with</code></a></p>
<h6 id="examples-44"><a class="doc-anchor" href="#examples-44">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="macro">assert!</span>( bits.ends_with(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>]));
<span class="macro">assert!</span>(!bits.ends_with(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]));</code></pre></div>
<p>This always returns <code>true</code> if the needle is empty:</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="kw">let </span>empty = <span class="macro">bits!</span>[];
<span class="macro">assert!</span>(bits.ends_with(empty));
<span class="macro">assert!</span>(empty.ends_with(empty));</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.strip_prefix" class="method"><h4 class="code-header">pub fn <a href="#method.strip_prefix" class="fn">strip_prefix</a>&lt;T2, O2&gt;(
&amp;self,
prefix: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T2, O2&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;&amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;&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>Removes a prefix bit-slice, if present.</p>
<p>Like <a href="struct.BitSlice.html#method.starts_with" title="method common_base::bit_vec::prelude::BitSlice::starts_with"><code>.starts_with()</code></a>, the search key does not need to share type
parameters with the bit-slice being stripped. If
<code>self.starts_with(suffix)</code>, then this returns <code>Some(&amp;self[prefix.len() ..])</code>, otherwise it returns <code>None</code>.</p>
<h6 id="original-46"><a class="doc-anchor" href="#original-46">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.strip_prefix"><code>slice::strip_prefix</code></a></p>
<h6 id="api-differences-23"><a class="doc-anchor" href="#api-differences-23">§</a>API Differences</h6>
<p><code>BitSlice</code> does not support pattern searches; instead, it permits <code>self</code>
and <code>prefix</code> to differ in type parameters.</p>
<h6 id="examples-45"><a class="doc-anchor" href="#examples-45">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="macro">assert_eq!</span>(bits.strip_prefix(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]).unwrap(), bits[<span class="number">2 </span>..]);
<span class="macro">assert_eq!</span>(bits.strip_prefix(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>,]).unwrap(), bits[<span class="number">4 </span>..]);
<span class="macro">assert!</span>(bits.strip_prefix(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>]).is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.strip_suffix" class="method"><h4 class="code-header">pub fn <a href="#method.strip_suffix" class="fn">strip_suffix</a>&lt;T2, O2&gt;(
&amp;self,
suffix: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T2, O2&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;&amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;&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>Removes a suffix bit-slice, if present.</p>
<p>Like <a href="Self::ends_with."><code>.ends_with()</code></a>, the search key does not need to share type
parameters with the bit-slice being stripped. If
<code>self.ends_with(suffix)</code>, then this returns <code>Some(&amp;self[.. self.len() - suffix.len()])</code>, otherwise it returns <code>None</code>.</p>
<h6 id="original-47"><a class="doc-anchor" href="#original-47">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.strip_suffix"><code>slice::strip_suffix</code></a></p>
<h6 id="api-differences-24"><a class="doc-anchor" href="#api-differences-24">§</a>API Differences</h6>
<p><code>BitSlice</code> does not support pattern searches; instead, it permits <code>self</code>
and <code>suffix</code> to differ in type parameters.</p>
<h6 id="examples-46"><a class="doc-anchor" href="#examples-46">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="macro">assert_eq!</span>(bits.strip_suffix(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>]).unwrap(), bits[.. <span class="number">7</span>]);
<span class="macro">assert_eq!</span>(bits.strip_suffix(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>]).unwrap(), bits[.. <span class="number">5</span>]);
<span class="macro">assert!</span>(bits.strip_suffix(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>]).is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.rotate_left" class="method"><h4 class="code-header">pub fn <a href="#method.rotate_left" class="fn">rotate_left</a>(&amp;mut self, by: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Rotates the contents of a bit-slice to the left (towards the zero
index).</p>
<p>This essentially splits the bit-slice at <code>by</code>, then exchanges the two
pieces. <code>self[.. by]</code> becomes the first section, and is then followed by
<code>self[.. by]</code>.</p>
<p>The implementation is batch-accelerated where possible. It should have a
runtime complexity much lower than <code>O(by)</code>.</p>
<h6 id="original-48"><a class="doc-anchor" href="#original-48">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_left"><code>slice::rotate_left</code></a></p>
<h6 id="examples-47"><a class="doc-anchor" href="#examples-47">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="comment">// split occurs here ^
</span>bits.rotate_left(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.rotate_right" class="method"><h4 class="code-header">pub fn <a href="#method.rotate_right" class="fn">rotate_right</a>(&amp;mut self, by: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Rotates the contents of a bit-slice to the right (away from the zero
index).</p>
<p>This essentially splits the bit-slice at <code>self.len() - by</code>, then
exchanges the two pieces. <code>self[len - by ..]</code> becomes the first section,
and is then followed by <code>self[.. len - by]</code>.</p>
<p>The implementation is batch-accelerated where possible. It should have a
runtime complexity much lower than <code>O(by)</code>.</p>
<h6 id="original-49"><a class="doc-anchor" href="#original-49">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_right"><code>slice::rotate_right</code></a></p>
<h6 id="examples-48"><a class="doc-anchor" href="#examples-48">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="comment">// split occurs here ^
</span>bits.rotate_right(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.fill" class="method"><h4 class="code-header">pub fn <a href="#method.fill" class="fn">fill</a>(&amp;mut 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>Fills the bit-slice with a given bit.</p>
<p>This is a recent stabilization in the standard library. <code>bitvec</code>
previously offered this behavior as the novel API <code>.set_all()</code>. That
method name is now removed in favor of this standard-library analogue.</p>
<h6 id="original-50"><a class="doc-anchor" href="#original-50">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.fill"><code>slice::fill</code></a></p>
<h6 id="examples-49"><a class="doc-anchor" href="#examples-49">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>; <span class="number">5</span>];
bits.fill(<span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>; <span class="number">5</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.fill_with" class="method"><h4 class="code-header">pub fn <a href="#method.fill_with" class="fn">fill_with</a>&lt;F&gt;(&amp;mut self, func: F)<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Fills the bit-slice with bits produced by a generator function.</p>
<h6 id="original-51"><a class="doc-anchor" href="#original-51">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.fill_with"><code>slice::fill_with</code></a></p>
<h6 id="api-differences-25"><a class="doc-anchor" href="#api-differences-25">§</a>API Differences</h6>
<p>The generator function receives the index of the bit being initialized
as an argument.</p>
<h6 id="examples-50"><a class="doc-anchor" href="#examples-50">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>; <span class="number">5</span>];
bits.fill_with(|idx| idx % <span class="number">2 </span>== <span class="number">0</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>]);</code></pre></div></div></details><section id="method.clone_from_slice" class="method"><h4 class="code-header">pub fn <a href="#method.clone_from_slice" class="fn">clone_from_slice</a>&lt;T2, O2&gt;(&amp;mut self, src: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;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><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>.clone_from_bitslice()</code> instead</span></div></span><section id="method.copy_from_slice" class="method"><h4 class="code-header">pub fn <a href="#method.copy_from_slice" class="fn">copy_from_slice</a>(&amp;mut self, src: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;)</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>.copy_from_bitslice()</code> instead</span></div></span><details class="toggle method-toggle" open><summary><section id="method.copy_within" class="method"><h4 class="code-header">pub fn <a href="#method.copy_within" class="fn">copy_within</a>&lt;R&gt;(&amp;mut self, src: R, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)<div class="where">where
R: RangeExt&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Copies a span of bits to another location in the bit-slice.</p>
<p><code>src</code> is the range of bit-indices in the bit-slice to copy, and <code>dest is the starting index of the destination range. </code>src<code>and</code>dest .. dest +
src.len()<code>are permitted to overlap; the copy will automatically detect and manage this. However, both</code>src<code>and</code>dest .. dest + src.len()<code>**must** fall within the bounds of</code>self`.</p>
<h6 id="original-52"><a class="doc-anchor" href="#original-52">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.copy_within"><code>slice::copy_within</code></a></p>
<h6 id="panics-11"><a class="doc-anchor" href="#panics-11">§</a>Panics</h6>
<p>This panics if either the source or destination range exceed
<code>self.len()</code>.</p>
<h6 id="examples-51"><a class="doc-anchor" href="#examples-51">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
bits.copy_within(<span class="number">1 </span>.. <span class="number">5</span>, <span class="number">8</span>);
<span class="comment">// v v v v
</span><span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>]);
<span class="comment">// ^ ^ ^ ^</span></code></pre></div></div></details><section id="method.swap_with_slice" class="method"><h4 class="code-header">pub fn <a href="#method.swap_with_slice" class="fn">swap_with_slice</a>&lt;T2, O2&gt;(&amp;mut self, other: &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;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><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>.swap_with_bitslice()</code> instead</span></div></span><details class="toggle method-toggle" open><summary><section id="method.align_to" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.align_to" class="fn">align_to</a>&lt;U&gt;(
&amp;self,
) -&gt; (&amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;, &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;U, O&gt;, &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, 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>Produces bit-slice view(s) with different underlying storage types.</p>
<p>This may have unexpected effects, and you cannot assume that
<code>before[idx] == after[idx]</code>! Consult the <a href="https://bitvecto-rs.github.io/bitvec/memory-layout.html">tables in the manual</a>
for information about memory layouts.</p>
<h6 id="original-53"><a class="doc-anchor" href="#original-53">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.align_to"><code>slice::align_to</code></a></p>
<h6 id="notes"><a class="doc-anchor" href="#notes">§</a>Notes</h6>
<p>Unlike the standard library documentation, this explicitly guarantees
that the middle bit-slice will have maximal size. You may rely on this
property.</p>
<h6 id="safety-2"><a class="doc-anchor" href="#safety-2">§</a>Safety</h6>
<p>You may not use this to cast away alias protections. Rust does not have
support for higher-kinded types, so this cannot express the relation
<code>Outer&lt;T&gt; -&gt; Outer&lt;U&gt; where Outer: BitStoreContainer</code>, but memory safety
does require that you respect this rule. Reälign integers to integers,
<code>Cell</code>s to <code>Cell</code>s, and atomics to atomics, but do not cross these
boundaries.</p>
<h6 id="examples-52"><a class="doc-anchor" href="#examples-52">§</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>bytes: [u8; <span class="number">7</span>] = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>];
<span class="kw">let </span>bits = bytes.view_bits::&lt;Lsb0&gt;();
<span class="kw">let </span>(pfx, mid, sfx) = <span class="kw">unsafe </span>{
bits.align_to::&lt;u16&gt;()
};
<span class="macro">assert!</span>(pfx.len() &lt;= <span class="number">8</span>);
<span class="macro">assert_eq!</span>(mid.len(), <span class="number">48</span>);
<span class="macro">assert!</span>(sfx.len() &lt;= <span class="number">8</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.align_to_mut" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.align_to_mut" class="fn">align_to_mut</a>&lt;U&gt;(
&amp;mut self,
) -&gt; (&amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;, &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;U, O&gt;, &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, 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>Produces bit-slice view(s) with different underlying storage types.</p>
<p>This may have unexpected effects, and you cannot assume that
<code>before[idx] == after[idx]</code>! Consult the <a href="https://bitvecto-rs.github.io/bitvec/memory-layout.html">tables in the manual</a>
for information about memory layouts.</p>
<h6 id="original-54"><a class="doc-anchor" href="#original-54">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.align_to_mut"><code>slice::align_to_mut</code></a></p>
<h6 id="notes-1"><a class="doc-anchor" href="#notes-1">§</a>Notes</h6>
<p>Unlike the standard library documentation, this explicitly guarantees
that the middle bit-slice will have maximal size. You may rely on this
property.</p>
<h6 id="safety-3"><a class="doc-anchor" href="#safety-3">§</a>Safety</h6>
<p>You may not use this to cast away alias protections. Rust does not have
support for higher-kinded types, so this cannot express the relation
<code>Outer&lt;T&gt; -&gt; Outer&lt;U&gt; where Outer: BitStoreContainer</code>, but memory safety
does require that you respect this rule. Reälign integers to integers,
<code>Cell</code>s to <code>Cell</code>s, and atomics to atomics, but do not cross these
boundaries.</p>
<h6 id="examples-53"><a class="doc-anchor" href="#examples-53">§</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>bytes: [u8; <span class="number">7</span>] = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>];
<span class="kw">let </span>bits = bytes.view_bits_mut::&lt;Lsb0&gt;();
<span class="kw">let </span>(pfx, mid, sfx) = <span class="kw">unsafe </span>{
bits.align_to_mut::&lt;u16&gt;()
};
<span class="macro">assert!</span>(pfx.len() &lt;= <span class="number">8</span>);
<span class="macro">assert_eq!</span>(mid.len(), <span class="number">48</span>);
<span class="macro">assert!</span>(sfx.len() &lt;= <span class="number">8</span>);</code></pre></div></div></details><section id="method.to_vec" class="method"><h4 class="code-header">pub fn <a href="#method.to_vec" class="fn">to_vec</a>(&amp;self) -&gt; <a class="struct" href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec">BitVec</a>&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.Unalias" title="type common_base::bit_vec::prelude::BitStore::Unalias">Unalias</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="BitVec&lt;&lt;T as BitStore&gt;::Unalias, O&gt;"></a></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>.to_bitvec()</code> instead</span></div></span><details class="toggle method-toggle" open><summary><section id="method.repeat" class="method"><h4 class="code-header">pub fn <a href="#method.repeat" class="fn">repeat</a>(&amp;self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="struct" href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec">BitVec</a>&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.Unalias" title="type common_base::bit_vec::prelude::BitStore::Unalias">Unalias</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="BitVec&lt;&lt;T as BitStore&gt;::Unalias, O&gt;"></a></h4></section></summary><div class="docblock"><p>Creates a bit-vector by repeating a bit-slice <code>n</code> times.</p>
<h6 id="original-55"><a class="doc-anchor" href="#original-55">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.repeat"><code>slice::repeat</code></a></p>
<h6 id="panics-12"><a class="doc-anchor" href="#panics-12">§</a>Panics</h6>
<p>This method panics if <code>self.len() * n</code> exceeds the <code>BitVec</code> capacity.</p>
<h6 id="examples-54"><a class="doc-anchor" href="#examples-54">§</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="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>].repeat(<span class="number">3</span>), <span class="macro">bitvec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>]);</code></pre></div>
<p>This panics by exceeding bit-vector maximum capacity:</p>
<div class="example-wrap should_panic"><a href="#" class="tooltip" title="This example panics"></a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bitvec::prelude::<span class="kw-2">*</span>;
<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>].repeat(BitSlice::&lt;usize, Lsb0&gt;::MAX_BITS);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.as_bitptr" class="method"><h4 class="code-header">pub fn <a href="#method.as_bitptr" class="fn">as_bitptr</a>(&amp;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>Gets a raw pointer to the zeroth bit of the bit-slice.</p>
<h6 id="original-56"><a class="doc-anchor" href="#original-56">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr"><code>slice::as_ptr</code></a></p>
<h6 id="api-differences-26"><a class="doc-anchor" href="#api-differences-26">§</a>API Differences</h6>
<p>This is renamed in order to indicate that it is returning a <code>bitvec</code>
structure, not a raw pointer.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_bitptr" class="method"><h4 class="code-header">pub fn <a href="#method.as_mut_bitptr" class="fn">as_mut_bitptr</a>(&amp;mut 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>Gets a raw, write-capable pointer to the zeroth bit of the bit-slice.</p>
<h6 id="original-57"><a class="doc-anchor" href="#original-57">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.as_mut_ptr"><code>slice::as_mut_ptr</code></a></p>
<h6 id="api-differences-27"><a class="doc-anchor" href="#api-differences-27">§</a>API Differences</h6>
<p>This is renamed in order to indicate that it is returning a <code>bitvec</code>
structure, not a raw pointer.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_bitptr_range" class="method"><h4 class="code-header">pub fn <a href="#method.as_bitptr_range" class="fn">as_bitptr_range</a>(&amp;self) -&gt; <a class="struct" href="struct.BitPtrRange.html" title="struct common_base::bit_vec::prelude::BitPtrRange">BitPtrRange</a>&lt;Const, T, O&gt; <a href="#" class="tooltip" data-notable-ty="BitPtrRange&lt;Const, T, O&gt;"></a></h4></section></summary><div class="docblock"><p>Views the bit-slice as a half-open range of bit-pointers, to its first
bit <em>in</em> the bit-slice and first bit <em>beyond</em> it.</p>
<h6 id="original-58"><a class="doc-anchor" href="#original-58">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr_range"><code>slice::as_ptr_range</code></a></p>
<h6 id="api-differences-28"><a class="doc-anchor" href="#api-differences-28">§</a>API Differences</h6>
<p>This is renamed to indicate that it returns a <code>bitvec</code> structure, rather
than an ordinary <code>Range</code>.</p>
<h6 id="notes-2"><a class="doc-anchor" href="#notes-2">§</a>Notes</h6>
<p><code>BitSlice</code> does define a <a href="struct.BitSlice.html#method.as_ptr_range" title="method common_base::bit_vec::prelude::BitSlice::as_ptr_range"><code>.as_ptr_range()</code></a>, which returns a
<code>Range&lt;BitPtr&gt;</code>. <code>BitPtrRange</code> has additional capabilities that
<code>Range&lt;*const T&gt;</code> and <code>Range&lt;BitPtr&gt;</code> do not.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_bitptr_range" class="method"><h4 class="code-header">pub fn <a href="#method.as_mut_bitptr_range" class="fn">as_mut_bitptr_range</a>(&amp;mut self) -&gt; <a class="struct" href="struct.BitPtrRange.html" title="struct common_base::bit_vec::prelude::BitPtrRange">BitPtrRange</a>&lt;Mut, T, O&gt; <a href="#" class="tooltip" data-notable-ty="BitPtrRange&lt;Mut, T, O&gt;"></a></h4></section></summary><div class="docblock"><p>Views the bit-slice as a half-open range of write-capable bit-pointers,
to its first bit <em>in</em> the bit-slice and the first bit <em>beyond</em> it.</p>
<h6 id="original-59"><a class="doc-anchor" href="#original-59">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.as_mut_ptr_range"><code>slice::as_mut_ptr_range</code></a></p>
<h6 id="api-differences-29"><a class="doc-anchor" href="#api-differences-29">§</a>API Differences</h6>
<p>This is renamed to indicate that it returns a <code>bitvec</code> structure, rather
than an ordinary <code>Range</code>.</p>
<h6 id="notes-3"><a class="doc-anchor" href="#notes-3">§</a>Notes</h6>
<p><code>BitSlice</code> does define a [<code>.as_mut_ptr_range()</code>], which returns a
<code>Range&lt;BitPtr&gt;</code>. <code>BitPtrRange</code> has additional capabilities that
<code>Range&lt;*mut T&gt;</code> and <code>Range&lt;BitPtr&gt;</code> do not.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from_bitslice" class="method"><h4 class="code-header">pub fn <a href="#method.clone_from_bitslice" class="fn">clone_from_bitslice</a>&lt;T2, O2&gt;(&amp;mut self, src: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;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>Copies the bits from <code>src</code> into <code>self</code>.</p>
<p><code>self</code> and <code>src</code> must have the same length.</p>
<h6 id="performance"><a class="doc-anchor" href="#performance">§</a>Performance</h6>
<p>If <code>src</code> has the same type arguments as <code>self</code>, it will use the same
implementation as <a href="struct.BitSlice.html#method.copy_from_bitslice" title="method common_base::bit_vec::prelude::BitSlice::copy_from_bitslice"><code>.copy_from_bitslice()</code></a>; if you know that this will
always be the case, you should prefer to use that method directly.</p>
<p>Only <code>.copy_from_bitslice()</code> is <em>able</em> to perform acceleration; this
method is <em>always</em> required to perform a bit-by-bit crawl over both
bit-slices.</p>
<h6 id="original-60"><a class="doc-anchor" href="#original-60">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.clone_from_slice"><code>slice::clone_from_slice</code></a></p>
<h6 id="api-differences-30"><a class="doc-anchor" href="#api-differences-30">§</a>API Differences</h6>
<p>This is renamed to reflect that it copies from another bit-slice, not
from an element slice.</p>
<p>In order to support general usage, it allows <code>src</code> to have different
type parameters than <code>self</code>, at the cost of performance optimizations.</p>
<h6 id="panics-13"><a class="doc-anchor" href="#panics-13">§</a>Panics</h6>
<p>This panics if the two bit-slices have different lengths.</p>
<h6 id="examples-55"><a class="doc-anchor" href="#examples-55">§</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>;</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.copy_from_bitslice" class="method"><h4 class="code-header">pub fn <a href="#method.copy_from_bitslice" class="fn">copy_from_bitslice</a>(&amp;mut self, src: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;)</h4></section></summary><div class="docblock"><p>Copies all bits from <code>src</code> into <code>self</code>, using batched acceleration when
possible.</p>
<p><code>self</code> and <code>src</code> must have the same length.</p>
<h6 id="original-61"><a class="doc-anchor" href="#original-61">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.copy_from_slice"><code>slice::copy_from_slice</code></a></p>
<h6 id="panics-14"><a class="doc-anchor" href="#panics-14">§</a>Panics</h6>
<p>This panics if the two bit-slices have different lengths.</p>
<h6 id="examples-56"><a class="doc-anchor" href="#examples-56">§</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>;</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.swap_with_bitslice" class="method"><h4 class="code-header">pub fn <a href="#method.swap_with_bitslice" class="fn">swap_with_bitslice</a>&lt;T2, O2&gt;(&amp;mut self, other: &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;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 contents of two bit-slices.</p>
<p><code>self</code> and <code>other</code> must have the same length.</p>
<h6 id="original-62"><a class="doc-anchor" href="#original-62">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.swap_with_slice"><code>slice::swap_with_slice</code></a></p>
<h6 id="api-differences-31"><a class="doc-anchor" href="#api-differences-31">§</a>API Differences</h6>
<p>This method is renamed, as it takes a bit-slice rather than an element
slice.</p>
<h6 id="panics-15"><a class="doc-anchor" href="#panics-15">§</a>Panics</h6>
<p>This panics if the two bit-slices have different lengths.</p>
<h6 id="examples-57"><a class="doc-anchor" href="#examples-57">§</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>one = [<span class="number">0xA5u8</span>, <span class="number">0x69</span>];
<span class="kw">let </span><span class="kw-2">mut </span>two = <span class="number">0x1234u16</span>;
<span class="kw">let </span>one_bits = one.view_bits_mut::&lt;Msb0&gt;();
<span class="kw">let </span>two_bits = two.view_bits_mut::&lt;Lsb0&gt;();
one_bits.swap_with_bitslice(two_bits);
<span class="macro">assert_eq!</span>(one, [<span class="number">0x2C</span>, <span class="number">0x48</span>]);
<span class="macro">assert_eq!</span>(two, <span class="number">0x96A5</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.set" class="method"><h4 class="code-header">pub fn <a href="#method.set" class="fn">set</a>(&amp;mut self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Writes a new value into a single bit.</p>
<p>This is the replacement for <code>*slice[index] = value;</code>, as <code>bitvec</code> is not
able to express that under the current <code>IndexMut</code> API signature.</p>
<h6 id="parameters"><a class="doc-anchor" href="#parameters">§</a>Parameters</h6>
<ul>
<li><code>&amp;mut self</code></li>
<li><code>index</code>: The bit-index to set. It must be in <code>0 .. self.len()</code>.</li>
<li><code>value</code>: The new bit-value to write into the bit at <code>index</code>.</li>
</ul>
<h6 id="panics-16"><a class="doc-anchor" href="#panics-16">§</a>Panics</h6>
<p>This panics if <code>index</code> is out of bounds.</p>
<h6 id="examples-58"><a class="doc-anchor" href="#examples-58">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>, <span class="number">1</span>];
bits.set(<span class="number">0</span>, <span class="bool-val">true</span>);
bits.set(<span class="number">1</span>, <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.set_unchecked" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.set_unchecked" class="fn">set_unchecked</a>(&amp;mut self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Writes a new value into a single bit, without bounds checking.</p>
<h6 id="parameters-1"><a class="doc-anchor" href="#parameters-1">§</a>Parameters</h6>
<ul>
<li><code>&amp;mut self</code></li>
<li><code>index</code>: The bit-index to set. It must be in <code>0 .. self.len()</code>.</li>
<li><code>value</code>: The new bit-value to write into the bit at <code>index</code>.</li>
</ul>
<h6 id="safety-4"><a class="doc-anchor" href="#safety-4">§</a>Safety</h6>
<p>You must ensure that <code>index</code> is in the range <code>0 .. self.len()</code>.</p>
<p>This performs bit-pointer offset arithmetic without doing any bounds
checks. If <code>index</code> is out of bounds, then this will issue an
out-of-bounds access and will trigger memory unsafety.</p>
<h6 id="examples-59"><a class="doc-anchor" href="#examples-59">§</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>bits = <span class="kw-2">&amp;mut </span>data.view_bits_mut::&lt;Lsb0&gt;()[.. <span class="number">2</span>];
<span class="macro">assert_eq!</span>(bits.len(), <span class="number">2</span>);
<span class="kw">unsafe </span>{
bits.set_unchecked(<span class="number">3</span>, <span class="bool-val">true</span>);
}
<span class="macro">assert_eq!</span>(data, <span class="number">8</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.replace" class="method"><h4 class="code-header">pub fn <a href="#method.replace" class="fn">replace</a>(&amp;mut self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <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 value into a bit, and returns its previous value.</p>
<h6 id="panics-17"><a class="doc-anchor" href="#panics-17">§</a>Panics</h6>
<p>This panics if <code>index</code> is not less than <code>self.len()</code>.</p>
<h6 id="examples-60"><a class="doc-anchor" href="#examples-60">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>];
<span class="macro">assert!</span>(!bits.replace(<span class="number">0</span>, <span class="bool-val">true</span>));
<span class="macro">assert!</span>(bits[<span class="number">0</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.replace_unchecked" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.replace_unchecked" class="fn">replace_unchecked</a>(&amp;mut self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <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 value into a bit, returning the previous value, without
bounds checking.</p>
<h6 id="safety-5"><a class="doc-anchor" href="#safety-5">§</a>Safety</h6>
<p><code>index</code> must be less than <code>self.len()</code>.</p>
<h6 id="examples-61"><a class="doc-anchor" href="#examples-61">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">0</span>, <span class="number">0</span>];
<span class="kw">let </span>old = <span class="kw">unsafe </span>{
<span class="kw">let </span>a = <span class="kw-2">&amp;mut </span>bits[.. <span class="number">1</span>];
a.replace_unchecked(<span class="number">1</span>, <span class="bool-val">true</span>)
};
<span class="macro">assert!</span>(!old);
<span class="macro">assert!</span>(bits[<span class="number">1</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.swap_unchecked" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.swap_unchecked" class="fn">swap_unchecked</a>(&amp;mut self, a: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, b: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Swaps two bits in a bit-slice, without bounds checking.</p>
<p>See <a href="struct.BitSlice.html#method.swap" title="method common_base::bit_vec::prelude::BitSlice::swap"><code>.swap()</code></a> for documentation.</p>
<h6 id="safety-6"><a class="doc-anchor" href="#safety-6">§</a>Safety</h6>
<p>You must ensure that <code>a</code> and <code>b</code> are both in the range <code>0 .. self.len()</code>.</p>
<p>This method performs bit-pointer offset arithmetic without doing any
bounds checks. If <code>a</code> or <code>b</code> are out of bounds, then this will issue an
out-of-bounds access and will trigger memory unsafety.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_unchecked" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.split_at_unchecked" class="fn">split_at_unchecked</a>(
&amp;self,
mid: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
) -&gt; (&amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;, &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;)</h4></section></summary><div class="docblock"><p>Splits a bit-slice at an index, without bounds checking.</p>
<p>See <a href="struct.BitSlice.html#method.split_at" title="method common_base::bit_vec::prelude::BitSlice::split_at"><code>.split_at()</code></a> for documentation.</p>
<h6 id="safety-7"><a class="doc-anchor" href="#safety-7">§</a>Safety</h6>
<p>You must ensure that <code>mid</code> is in the range <code>0 ..= self.len()</code>.</p>
<p>This method produces new bit-slice references. If <code>mid</code> is out of
bounds, its behavior is <strong>library-level</strong> undefined. You must
conservatively assume that an out-of-bounds split point produces
compiler-level UB.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_unchecked_mut" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.split_at_unchecked_mut" class="fn">split_at_unchecked_mut</a>(
&amp;mut self,
mid: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
) -&gt; (&amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&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.Alias" title="type common_base::bit_vec::prelude::BitStore::Alias">Alias</a>, O&gt;, &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&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.Alias" title="type common_base::bit_vec::prelude::BitStore::Alias">Alias</a>, O&gt;)</h4></section></summary><div class="docblock"><p>Splits a mutable bit-slice at an index, without bounds checking.</p>
<p>See <a href="struct.BitSlice.html#method.split_at_mut" title="method common_base::bit_vec::prelude::BitSlice::split_at_mut"><code>.split_at_mut()</code></a> for documentation.</p>
<h6 id="safety-8"><a class="doc-anchor" href="#safety-8">§</a>Safety</h6>
<p>You must ensure that <code>mid</code> is in the range <code>0 ..= self.len()</code>.</p>
<p>This method produces new bit-slice references. If <code>mid</code> is out of
bounds, its behavior is <strong>library-level</strong> undefined. You must
conservatively assume that an out-of-bounds split point produces
compiler-level UB.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_within_unchecked" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.copy_within_unchecked" class="fn">copy_within_unchecked</a>&lt;R&gt;(&amp;mut self, src: R, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)<div class="where">where
R: RangeExt&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Copies bits from one region of the bit-slice to another region of
itself, without doing bounds checks.</p>
<p>The regions are allowed to overlap.</p>
<h6 id="parameters-2"><a class="doc-anchor" href="#parameters-2">§</a>Parameters</h6>
<ul>
<li><code>&amp;mut self</code></li>
<li><code>src</code>: The range within <code>self</code> from which to copy.</li>
<li><code>dst</code>: The starting index within <code>self</code> at which to paste.</li>
</ul>
<h6 id="effects"><a class="doc-anchor" href="#effects">§</a>Effects</h6>
<p><code>self[src]</code> is copied to <code>self[dest .. dest + src.len()]</code>. The bits of
<code>self[src]</code> are in an unspecified, but initialized, state.</p>
<h6 id="safety-9"><a class="doc-anchor" href="#safety-9">§</a>Safety</h6>
<p><code>src.end()</code> and <code>dest + src.len()</code> must be entirely within bounds.</p>
<h6 id="examples-62"><a class="doc-anchor" href="#examples-62">§</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">0b1011_0000u8</span>;
<span class="kw">let </span>bits = data.view_bits_mut::&lt;Msb0&gt;();
<span class="kw">unsafe </span>{
bits.copy_within_unchecked(.. <span class="number">4</span>, <span class="number">2</span>);
}
<span class="macro">assert_eq!</span>(data, <span class="number">0b1010_1100</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.bit_domain" class="method"><h4 class="code-header">pub fn <a href="#method.bit_domain" class="fn">bit_domain</a>(&amp;self) -&gt; BitDomain&lt;'_, Const, T, O&gt;</h4></section></summary><div class="docblock"><p>Partitions a bit-slice into maybe-contended and known-uncontended parts.</p>
<p>The documentation of <code>BitDomain</code> goes into this in more detail. In
short, this produces a <code>&amp;BitSlice</code> that is as large as possible without
requiring alias protection, as well as any bits that were not able to be
included in the unaliased bit-slice.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.bit_domain_mut" class="method"><h4 class="code-header">pub fn <a href="#method.bit_domain_mut" class="fn">bit_domain_mut</a>(&amp;mut self) -&gt; BitDomain&lt;'_, Mut, T, O&gt;</h4></section></summary><div class="docblock"><p>Partitions a mutable bit-slice into maybe-contended and
known-uncontended parts.</p>
<p>The documentation of <code>BitDomain</code> goes into this in more detail. In
short, this produces a <code>&amp;mut BitSlice</code> that is as large as possible
without requiring alias protection, as well as any bits that were not
able to be included in the unaliased bit-slice.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.domain" class="method"><h4 class="code-header">pub fn <a href="#method.domain" class="fn">domain</a>(&amp;self) -&gt; Domain&lt;'_, Const, T, O&gt;</h4></section></summary><div class="docblock"><p>Views the underlying memory of a bit-slice, removing alias protections
where possible.</p>
<p>The documentation of <code>Domain</code> goes into this in more detail. In short,
this produces a <code>&amp;[T]</code> slice with alias protections removed, covering
all elements that <code>self</code> completely fills. Partially-used elements on
either the front or back edge of the slice are returned separately.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.domain_mut" class="method"><h4 class="code-header">pub fn <a href="#method.domain_mut" class="fn">domain_mut</a>(&amp;mut self) -&gt; Domain&lt;'_, Mut, T, O&gt;</h4></section></summary><div class="docblock"><p>Views the underlying memory of a bit-slice, removing alias protections
where possible.</p>
<p>The documentation of <code>Domain</code> goes into this in more detail. In short,
this produces a <code>&amp;mut [T]</code> slice with alias protections removed,
covering all elements that <code>self</code> completely fills. Partially-used
elements on the front or back edge of the slice are returned separately.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.count_ones" class="method"><h4 class="code-header">pub fn <a href="#method.count_ones" class="fn">count_ones</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Counts the number of bits set to <code>1</code> in the bit-slice contents.</p>
<h6 id="examples-63"><a class="doc-anchor" href="#examples-63">§</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>bits = <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>];
<span class="macro">assert_eq!</span>(bits[.. <span class="number">2</span>].count_ones(), <span class="number">2</span>);
<span class="macro">assert_eq!</span>(bits[<span class="number">2 </span>..].count_ones(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[].count_ones(), <span class="number">0</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.count_zeros" class="method"><h4 class="code-header">pub fn <a href="#method.count_zeros" class="fn">count_zeros</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Counts the number of bits cleared to <code>0</code> in the bit-slice contents.</p>
<h6 id="examples-64"><a class="doc-anchor" href="#examples-64">§</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>bits = <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>];
<span class="macro">assert_eq!</span>(bits[.. <span class="number">2</span>].count_zeros(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(bits[<span class="number">2 </span>..].count_zeros(), <span class="number">2</span>);
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[].count_zeros(), <span class="number">0</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.iter_ones" class="method"><h4 class="code-header">pub fn <a href="#method.iter_ones" class="fn">iter_ones</a>(&amp;self) -&gt; IterOnes&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Enumerates the index of each bit in a bit-slice set to <code>1</code>.</p>
<p>This is a shorthand for a <code>.enumerate().filter_map()</code> iterator that
selects the index of each <code>true</code> bit; however, its implementation is
eligible for optimizations that the individual-bit iterator is not.</p>
<p>Specializations for the <code>Lsb0</code> and <code>Msb0</code> orderings allow processors
with instructions that seek particular bits within an element to operate
on whole elements, rather than on each bit individually.</p>
<h6 id="examples-65"><a class="doc-anchor" href="#examples-65">§</a>Examples</h6>
<p>This example uses <code>.iter_ones()</code>, a <code>.filter_map()</code> that finds the index
of each set bit, and the known indices, in order to show that they have
equivalent behavior.</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="kw">let </span>iter_ones = bits.iter_ones();
<span class="kw">let </span>known_indices = [<span class="number">1</span>, <span class="number">4</span>, <span class="number">8</span>].iter().copied();
<span class="kw">let </span>filter = bits.iter()
.by_vals()
.enumerate()
.filter_map(|(idx, bit)| <span class="kw">if </span>bit { <span class="prelude-val">Some</span>(idx) } <span class="kw">else </span>{ <span class="prelude-val">None </span>});
<span class="kw">let </span>all = iter_ones.zip(known_indices).zip(filter);
<span class="kw">for </span>((iter_one, known), filtered) <span class="kw">in </span>all {
<span class="macro">assert_eq!</span>(iter_one, known);
<span class="macro">assert_eq!</span>(known, filtered);
}</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.iter_zeros" class="method"><h4 class="code-header">pub fn <a href="#method.iter_zeros" class="fn">iter_zeros</a>(&amp;self) -&gt; IterZeros&lt;'_, T, O&gt;</h4></section></summary><div class="docblock"><p>Enumerates the index of each bit in a bit-slice cleared to <code>0</code>.</p>
<p>This is a shorthand for a <code>.enumerate().filter_map()</code> iterator that
selects the index of each <code>false</code> bit; however, its implementation is
eligible for optimizations that the individual-bit iterator is not.</p>
<p>Specializations for the <code>Lsb0</code> and <code>Msb0</code> orderings allow processors
with instructions that seek particular bits within an element to operate
on whole elements, rather than on each bit individually.</p>
<h6 id="examples-66"><a class="doc-anchor" href="#examples-66">§</a>Examples</h6>
<p>This example uses <code>.iter_zeros()</code>, a <code>.filter_map()</code> that finds the
index of each cleared bit, and the known indices, in order to show that
they have equivalent behavior.</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>bits = <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>];
<span class="kw">let </span>iter_zeros = bits.iter_zeros();
<span class="kw">let </span>known_indices = [<span class="number">1</span>, <span class="number">4</span>, <span class="number">8</span>].iter().copied();
<span class="kw">let </span>filter = bits.iter()
.by_vals()
.enumerate()
.filter_map(|(idx, bit)| <span class="kw">if </span>!bit { <span class="prelude-val">Some</span>(idx) } <span class="kw">else </span>{ <span class="prelude-val">None </span>});
<span class="kw">let </span>all = iter_zeros.zip(known_indices).zip(filter);
<span class="kw">for </span>((iter_zero, known), filtered) <span class="kw">in </span>all {
<span class="macro">assert_eq!</span>(iter_zero, known);
<span class="macro">assert_eq!</span>(known, filtered);
}</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.first_one" class="method"><h4 class="code-header">pub fn <a href="#method.first_one" class="fn">first_one</a>(&amp;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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</h4></section></summary><div class="docblock"><p>Finds the index of the first bit in the bit-slice set to <code>1</code>.</p>
<p>Returns <code>None</code> if there is no <code>true</code> bit in the bit-slice.</p>
<h6 id="examples-67"><a class="doc-anchor" href="#examples-67">§</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="macro">assert!</span>(<span class="macro">bits!</span>[].first_one().is_none());
<span class="macro">assert!</span>(<span class="macro">bits!</span>[<span class="number">0</span>].first_one().is_none());
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>].first_one(), <span class="prelude-val">Some</span>(<span class="number">1</span>));</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.first_zero" class="method"><h4 class="code-header">pub fn <a href="#method.first_zero" class="fn">first_zero</a>(&amp;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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</h4></section></summary><div class="docblock"><p>Finds the index of the first bit in the bit-slice cleared to <code>0</code>.</p>
<p>Returns <code>None</code> if there is no <code>false</code> bit in the bit-slice.</p>
<h6 id="examples-68"><a class="doc-anchor" href="#examples-68">§</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="macro">assert!</span>(<span class="macro">bits!</span>[].first_zero().is_none());
<span class="macro">assert!</span>(<span class="macro">bits!</span>[<span class="number">1</span>].first_zero().is_none());
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>].first_zero(), <span class="prelude-val">Some</span>(<span class="number">1</span>));</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.last_one" class="method"><h4 class="code-header">pub fn <a href="#method.last_one" class="fn">last_one</a>(&amp;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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</h4></section></summary><div class="docblock"><p>Finds the index of the last bit in the bit-slice set to <code>1</code>.</p>
<p>Returns <code>None</code> if there is no <code>true</code> bit in the bit-slice.</p>
<h6 id="examples-69"><a class="doc-anchor" href="#examples-69">§</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="macro">assert!</span>(<span class="macro">bits!</span>[].last_one().is_none());
<span class="macro">assert!</span>(<span class="macro">bits!</span>[<span class="number">0</span>].last_one().is_none());
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>].last_one(), <span class="prelude-val">Some</span>(<span class="number">0</span>));</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.last_zero" class="method"><h4 class="code-header">pub fn <a href="#method.last_zero" class="fn">last_zero</a>(&amp;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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</h4></section></summary><div class="docblock"><p>Finds the index of the last bit in the bit-slice cleared to <code>0</code>.</p>
<p>Returns <code>None</code> if there is no <code>false</code> bit in the bit-slice.</p>
<h6 id="examples-70"><a class="doc-anchor" href="#examples-70">§</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="macro">assert!</span>(<span class="macro">bits!</span>[].last_zero().is_none());
<span class="macro">assert!</span>(<span class="macro">bits!</span>[<span class="number">1</span>].last_zero().is_none());
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>].last_zero(), <span class="prelude-val">Some</span>(<span class="number">0</span>));</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.leading_ones" class="method"><h4 class="code-header">pub fn <a href="#method.leading_ones" class="fn">leading_ones</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Counts the number of bits from the start of the bit-slice to the first
bit set to <code>0</code>.</p>
<p>This returns <code>0</code> if the bit-slice is empty.</p>
<h6 id="examples-71"><a class="doc-anchor" href="#examples-71">§</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="macro">assert_eq!</span>(<span class="macro">bits!</span>[].leading_ones(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">0</span>].leading_ones(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>].leading_ones(), <span class="number">1</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.leading_zeros" class="method"><h4 class="code-header">pub fn <a href="#method.leading_zeros" class="fn">leading_zeros</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Counts the number of bits from the start of the bit-slice to the first
bit set to <code>1</code>.</p>
<p>This returns <code>0</code> if the bit-slice is empty.</p>
<h6 id="examples-72"><a class="doc-anchor" href="#examples-72">§</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="macro">assert_eq!</span>(<span class="macro">bits!</span>[].leading_zeros(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">1</span>].leading_zeros(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>].leading_zeros(), <span class="number">1</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.trailing_ones" class="method"><h4 class="code-header">pub fn <a href="#method.trailing_ones" class="fn">trailing_ones</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Counts the number of bits from the end of the bit-slice to the last bit
set to <code>0</code>.</p>
<p>This returns <code>0</code> if the bit-slice is empty.</p>
<h6 id="examples-73"><a class="doc-anchor" href="#examples-73">§</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="macro">assert_eq!</span>(<span class="macro">bits!</span>[].trailing_ones(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">0</span>].trailing_ones(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>].trailing_ones(), <span class="number">1</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.trailing_zeros" class="method"><h4 class="code-header">pub fn <a href="#method.trailing_zeros" class="fn">trailing_zeros</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Counts the number of bits from the end of the bit-slice to the last bit
set to <code>1</code>.</p>
<p>This returns <code>0</code> if the bit-slice is empty.</p>
<h6 id="examples-74"><a class="doc-anchor" href="#examples-74">§</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="macro">assert_eq!</span>(<span class="macro">bits!</span>[].trailing_zeros(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">1</span>].trailing_zeros(), <span class="number">0</span>);
<span class="macro">assert_eq!</span>(<span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>].trailing_zeros(), <span class="number">1</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.any" class="method"><h4 class="code-header">pub fn <a href="#method.any" class="fn">any</a>(&amp;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>Tests if there is at least one bit set to <code>1</code> in the bit-slice.</p>
<p>Returns <code>false</code> when <code>self</code> is empty.</p>
<h6 id="examples-75"><a class="doc-anchor" href="#examples-75">§</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="macro">assert!</span>(!<span class="macro">bits!</span>[].any());
<span class="macro">assert!</span>(!<span class="macro">bits!</span>[<span class="number">0</span>].any());
<span class="macro">assert!</span>(<span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>].any());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.all" class="method"><h4 class="code-header">pub fn <a href="#method.all" class="fn">all</a>(&amp;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>Tests if every bit is set to <code>1</code> in the bit-slice.</p>
<p>Returns <code>true</code> when <code>self</code> is empty.</p>
<h6 id="examples-76"><a class="doc-anchor" href="#examples-76">§</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="macro">assert!</span>( <span class="macro">bits!</span>[].all());
<span class="macro">assert!</span>(!<span class="macro">bits!</span>[<span class="number">0</span>].all());
<span class="macro">assert!</span>( <span class="macro">bits!</span>[<span class="number">1</span>].all());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.not_any" class="method"><h4 class="code-header">pub fn <a href="#method.not_any" class="fn">not_any</a>(&amp;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>Tests if every bit is cleared to <code>0</code> in the bit-slice.</p>
<p>Returns <code>true</code> when <code>self</code> is empty.</p>
<h6 id="examples-77"><a class="doc-anchor" href="#examples-77">§</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="macro">assert!</span>( <span class="macro">bits!</span>[].not_any());
<span class="macro">assert!</span>(!<span class="macro">bits!</span>[<span class="number">1</span>].not_any());
<span class="macro">assert!</span>( <span class="macro">bits!</span>[<span class="number">0</span>].not_any());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.not_all" class="method"><h4 class="code-header">pub fn <a href="#method.not_all" class="fn">not_all</a>(&amp;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>Tests if at least one bit is cleared to <code>0</code> in the bit-slice.</p>
<p>Returns <code>false</code> when <code>self</code> is empty.</p>
<h6 id="examples-78"><a class="doc-anchor" href="#examples-78">§</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="macro">assert!</span>(!<span class="macro">bits!</span>[].not_all());
<span class="macro">assert!</span>(!<span class="macro">bits!</span>[<span class="number">1</span>].not_all());
<span class="macro">assert!</span>( <span class="macro">bits!</span>[<span class="number">0</span>].not_all());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.some" class="method"><h4 class="code-header">pub fn <a href="#method.some" class="fn">some</a>(&amp;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>Tests if at least one bit is set to <code>1</code>, and at least one bit is cleared
to <code>0</code>, in the bit-slice.</p>
<p>Returns <code>false</code> when <code>self</code> is empty.</p>
<h6 id="examples-79"><a class="doc-anchor" href="#examples-79">§</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="macro">assert!</span>(!<span class="macro">bits!</span>[].some());
<span class="macro">assert!</span>(!<span class="macro">bits!</span>[<span class="number">0</span>].some());
<span class="macro">assert!</span>(!<span class="macro">bits!</span>[<span class="number">1</span>].some());
<span class="macro">assert!</span>( <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>].some());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.shift_left" class="method"><h4 class="code-header">pub fn <a href="#method.shift_left" class="fn">shift_left</a>(&amp;mut self, by: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Shifts the contents of a bit-slice “left” (towards the zero-index),
clearing the “right” bits to <code>0</code>.</p>
<p>This is a strictly-worse analogue to taking <code>bits = &amp;bits[by ..]</code>: it
has to modify the entire memory region that <code>bits</code> governs, and destroys
contained information. Unless the actual memory layout and contents of
your bit-slice matters to your program, you should <em>probably</em> prefer to
munch your way forward through a bit-slice handle.</p>
<p>Note also that the “left” here is semantic only, and <strong>does not</strong>
necessarily correspond to a left-shift instruction applied to the
underlying integer storage.</p>
<p>This has no effect when <code>by</code> is <code>0</code>. When <code>by</code> is <code>self.len()</code>, the
bit-slice is entirely cleared to <code>0</code>.</p>
<h6 id="panics-18"><a class="doc-anchor" href="#panics-18">§</a>Panics</h6>
<p>This panics if <code>by</code> is not less than <code>self.len()</code>.</p>
<h6 id="examples-80"><a class="doc-anchor" href="#examples-80">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>];
<span class="comment">// these bits are retained ^--------------------------^
</span>bits.shift_left(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>]);
<span class="comment">// and move here ^--------------------------^
</span><span class="kw">let </span>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">1</span>; <span class="number">2</span>];
bits.shift_left(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">2</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.shift_right" class="method"><h4 class="code-header">pub fn <a href="#method.shift_right" class="fn">shift_right</a>(&amp;mut self, by: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Shifts the contents of a bit-slice “right” (away from the zero-index),
clearing the “left” bits to <code>0</code>.</p>
<p>This is a strictly-worse analogue to taking `bits = &amp;bits[.. bits.len()</p>
<ul>
<li>by]<code>: it must modify the entire memory region that </code>bits` governs, and
destroys contained information. Unless the actual memory layout and
contents of your bit-slice matters to your program, you should
<em>probably</em> prefer to munch your way backward through a bit-slice handle.</li>
</ul>
<p>Note also that the “right” here is semantic only, and <strong>does not</strong>
necessarily correspond to a right-shift instruction applied to the
underlying integer storage.</p>
<p>This has no effect when <code>by</code> is <code>0</code>. When <code>by</code> is <code>self.len()</code>, the
bit-slice is entirely cleared to <code>0</code>.</p>
<h6 id="panics-19"><a class="doc-anchor" href="#panics-19">§</a>Panics</h6>
<p>This panics if <code>by</code> is not less than <code>self.len()</code>.</p>
<h6 id="examples-81"><a class="doc-anchor" href="#examples-81">§</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>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>];
<span class="comment">// these bits stay ^--------------------------^
</span>bits.shift_right(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>]);
<span class="comment">// and move here ^--------------------------^
</span><span class="kw">let </span>bits = <span class="macro">bits!</span>[<span class="kw-2">mut </span><span class="number">1</span>; <span class="number">2</span>];
bits.shift_right(<span class="number">2</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">2</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.set_aliased" class="method"><h4 class="code-header">pub fn <a href="#method.set_aliased" class="fn">set_aliased</a>(&amp;self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Writes a new value into a single bit, using alias-safe operations.</p>
<p>This is equivalent to <a href="struct.BitSlice.html#method.set" title="method common_base::bit_vec::prelude::BitSlice::set"><code>.set()</code></a>, except that it does not require an
<code>&amp;mut</code> reference, and allows bit-slices with alias-safe storage to share
write permissions.</p>
<h6 id="parameters-3"><a class="doc-anchor" href="#parameters-3">§</a>Parameters</h6>
<ul>
<li><code>&amp;self</code>: This method only exists on bit-slices with alias-safe
storage, and so does not require exclusive access.</li>
<li><code>index</code>: The bit index to set. It must be in <code>0 .. self.len()</code>.</li>
<li><code>value</code>: The new bit-value to write into the bit at <code>index</code>.</li>
</ul>
<h6 id="panics-20"><a class="doc-anchor" href="#panics-20">§</a>Panics</h6>
<p>This panics if <code>index</code> is out of bounds.</p>
<h6 id="examples-82"><a class="doc-anchor" href="#examples-82">§</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">use </span>core::cell::Cell;
<span class="kw">let </span>bits: <span class="kw-2">&amp;</span>BitSlice&lt;<span class="kw">_</span>, <span class="kw">_</span>&gt; = <span class="macro">bits!</span>[Cell&lt;usize&gt;, Lsb0; <span class="number">0</span>, <span class="number">1</span>];
bits.set_aliased(<span class="number">0</span>, <span class="bool-val">true</span>);
bits.set_aliased(<span class="number">1</span>, <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(bits, <span class="macro">bits!</span>[<span class="number">1</span>, <span class="number">0</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.set_aliased_unchecked" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.set_aliased_unchecked" class="fn">set_aliased_unchecked</a>(&amp;self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Writes a new value into a single bit, using alias-safe operations and
without bounds checking.</p>
<p>This is equivalent to <a href="struct.BitSlice.html#method.set_unchecked" title="method common_base::bit_vec::prelude::BitSlice::set_unchecked"><code>.set_unchecked()</code></a>, except that it does not
require an <code>&amp;mut</code> reference, and allows bit-slices with alias-safe
storage to share write permissions.</p>
<h6 id="parameters-4"><a class="doc-anchor" href="#parameters-4">§</a>Parameters</h6>
<ul>
<li><code>&amp;self</code>: This method only exists on bit-slices with alias-safe
storage, and so does not require exclusive access.</li>
<li><code>index</code>: The bit index to set. It must be in <code>0 .. self.len()</code>.</li>
<li><code>value</code>: The new bit-value to write into the bit at <code>index</code>.</li>
</ul>
<h6 id="safety-10"><a class="doc-anchor" href="#safety-10">§</a>Safety</h6>
<p>The caller must ensure that <code>index</code> is not out of bounds.</p>
<h6 id="examples-83"><a class="doc-anchor" href="#examples-83">§</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">use </span>core::cell::Cell;
<span class="kw">let </span>data = Cell::new(<span class="number">0u8</span>);
<span class="kw">let </span>bits = <span class="kw-2">&amp;</span>data.view_bits::&lt;Lsb0&gt;()[.. <span class="number">2</span>];
<span class="kw">unsafe </span>{
bits.set_aliased_unchecked(<span class="number">3</span>, <span class="bool-val">true</span>);
}
<span class="macro">assert_eq!</span>(data.get(), <span class="number">8</span>);</code></pre></div></div></details><section id="associatedconstant.MAX_BITS" class="associatedconstant"><h4 class="code-header">pub const <a href="#associatedconstant.MAX_BITS" class="constant">MAX_BITS</a>: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = 2_305_843_009_213_693_951usize</h4></section><section id="associatedconstant.MAX_ELTS" class="associatedconstant"><h4 class="code-header">pub const <a href="#associatedconstant.MAX_ELTS" class="constant">MAX_ELTS</a>: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = BitSpan&lt;Const, T, O&gt;::REGION_MAX_ELTS</h4></section><details class="toggle method-toggle" open><summary><section id="method.to_bitvec" class="method"><h4 class="code-header">pub fn <a href="#method.to_bitvec" class="fn">to_bitvec</a>(&amp;self) -&gt; <a class="struct" href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec">BitVec</a>&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.Unalias" title="type common_base::bit_vec::prelude::BitStore::Unalias">Unalias</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="BitVec&lt;&lt;T as BitStore&gt;::Unalias, O&gt;"></a></h4></section></summary><div class="docblock"><p>Copies a bit-slice into an owned bit-vector.</p>
<p>Since the new vector is freshly owned, this gets marked as <code>::Unalias</code>
to remove any guards that may have been inserted by the bit-slices
history.</p>
<p>It does <em>not</em> use the underlying memory type, so that a <code>BitSlice&lt;_, Cell&lt;_&gt;&gt;</code> will produce a <code>BitVec&lt;_, Cell&lt;_&gt;&gt;</code>.</p>
<h6 id="original-63"><a class="doc-anchor" href="#original-63">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/std/primitive.slice.html#method.to_vec"><code>slice::to_vec</code></a></p>
<h6 id="examples-84"><a class="doc-anchor" href="#examples-84">§</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>bits = <span class="macro">bits!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">1</span>];
<span class="kw">let </span>bv = bits.to_bitvec();
<span class="macro">assert_eq!</span>(bits, bv);</code></pre></div></div></details></div></details><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-AsMut%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-AsMut%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.as_mut" class="method trait-impl"><a href="#method.as_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;mut BitSlice&lt;&lt;A as BitView&gt;::Store, O&gt;"></a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-AsRef%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.as_ref" class="method trait-impl"><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;BitSlice&lt;&lt;A as BitView&gt;::Store, O&gt;"></a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Binary-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Binary-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html" title="trait core::fmt::Binary">Binary</a> for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.Binary.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.Binary.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitAnd%3CRhs%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-BitAnd%3CRhs%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O, Rhs&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAnd.html" title="trait core::ops::bit::BitAnd">BitAnd</a>&lt;Rhs&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html" title="trait core::ops::bit::BitAndAssign">BitAndAssign</a>&lt;Rhs&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAnd.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>&amp;</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.bitand" class="method trait-impl"><a href="#method.bitand" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAnd.html#tymethod.bitand" class="fn">bitand</a>(self, rhs: Rhs) -&gt; &lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAnd.html" title="trait core::ops::bit::BitAnd">BitAnd</a>&lt;Rhs&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAnd.html#associatedtype.Output" title="type core::ops::bit::BitAnd::Output">Output</a></h4></section></summary><div class='docblock'>Performs the <code>&amp;</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAnd.html#tymethod.bitand">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitAndAssign%3C%26BitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="impl"><a href="#impl-BitAndAssign%3C%26BitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html" title="trait core::ops::bit::BitAndAssign">BitAndAssign</a>&lt;&amp;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;&gt; for <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.bitand_assign-1" class="method trait-impl"><a href="#method.bitand_assign-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html#tymethod.bitand_assign" class="fn">bitand_assign</a>(&amp;mut self, rhs: &amp;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;)</h4></section></summary><div class='docblock'>Performs the <code>&amp;=</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html#tymethod.bitand_assign">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitAndAssign%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="impl"><a href="#impl-BitAndAssign%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html" title="trait core::ops::bit::BitAndAssign">BitAndAssign</a>&lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;&gt; for <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.bitand_assign" class="method trait-impl"><a href="#method.bitand_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html#tymethod.bitand_assign" class="fn">bitand_assign</a>(&amp;mut self, rhs: <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;)</h4></section></summary><div class='docblock'>Performs the <code>&amp;=</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html#tymethod.bitand_assign">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitAndAssign%3CRhs%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-BitAndAssign%3CRhs%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O, Rhs&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html" title="trait core::ops::bit::BitAndAssign">BitAndAssign</a>&lt;Rhs&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html" title="trait core::ops::bit::BitAndAssign">BitAndAssign</a>&lt;Rhs&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitand_assign-2" class="method trait-impl"><a href="#method.bitand_assign-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html#tymethod.bitand_assign" class="fn">bitand_assign</a>(&amp;mut self, rhs: Rhs)</h4></section></summary><div class='docblock'>Performs the <code>&amp;=</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html#tymethod.bitand_assign">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitField-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-BitField-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitField</a> for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitField</a>,</div></h3><div class="docblock"><h4 id="bit-array-implementation-of-bitfield"><a class="doc-anchor" href="#bit-array-implementation-of-bitfield">§</a>Bit-Array Implementation of <code>BitField</code></h4>
<p>The <code>BitArray</code> implementation is only ever called when the entire bit-array is
available for use, which means it can skip the bit-slice memory detection and
instead use the underlying storage elements directly.</p>
</div></section></summary><div class="docblock"><p>The implementation still performs the segmentation for each element contained in
the array, in order to maintain value consistency so that viewing the array as a
bit-slice is still able to correctly interact with data contained in it.</p>
</div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.load_le" class="method trait-impl"><a href="#method.load_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait._.html#tymethod.load_le" class="fn">load_le</a>&lt;I&gt;(&amp;self) -&gt; I<div class="where">where
I: Integral,</div></h4></section></summary><div class='docblock'>Little-Endian Integer Loading <a href="trait._.html#tymethod.load_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.load_be" class="method trait-impl"><a href="#method.load_be" class="anchor">§</a><h4 class="code-header">fn <a href="trait._.html#tymethod.load_be" class="fn">load_be</a>&lt;I&gt;(&amp;self) -&gt; I<div class="where">where
I: Integral,</div></h4></section></summary><div class='docblock'>Big-Endian Integer Loading <a href="trait._.html#tymethod.load_be">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.store_le" class="method trait-impl"><a href="#method.store_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait._.html#tymethod.store_le" class="fn">store_le</a>&lt;I&gt;(&amp;mut self, value: I)<div class="where">where
I: Integral,</div></h4></section></summary><div class='docblock'>Little-Endian Integer Storing <a href="trait._.html#tymethod.store_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.store_be" class="method trait-impl"><a href="#method.store_be" class="anchor">§</a><h4 class="code-header">fn <a href="trait._.html#tymethod.store_be" class="fn">store_be</a>&lt;I&gt;(&amp;mut self, value: I)<div class="where">where
I: Integral,</div></h4></section></summary><div class='docblock'>Big-Endian Integer Storing <a href="trait._.html#tymethod.store_be">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.load" class="method trait-impl"><a href="#method.load" class="anchor">§</a><h4 class="code-header">fn <a href="trait._.html#method.load" class="fn">load</a>&lt;I&gt;(&amp;self) -&gt; I<div class="where">where
I: Integral,</div></h4></section></summary><div class='docblock'>Integer Loading <a href="trait._.html#method.load">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.store" class="method trait-impl"><a href="#method.store" class="anchor">§</a><h4 class="code-header">fn <a href="trait._.html#method.store" class="fn">store</a>&lt;I&gt;(&amp;mut self, value: I)<div class="where">where
I: Integral,</div></h4></section></summary><div class='docblock'>Integer Storing <a href="trait._.html#method.store">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOr%3CRhs%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-BitOr%3CRhs%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O, Rhs&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOr.html" title="trait core::ops::bit::BitOr">BitOr</a>&lt;Rhs&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html" title="trait core::ops::bit::BitOrAssign">BitOrAssign</a>&lt;Rhs&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOr.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>|</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.bitor" class="method trait-impl"><a href="#method.bitor" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOr.html#tymethod.bitor" class="fn">bitor</a>(self, rhs: Rhs) -&gt; &lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOr.html" title="trait core::ops::bit::BitOr">BitOr</a>&lt;Rhs&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOr.html#associatedtype.Output" title="type core::ops::bit::BitOr::Output">Output</a></h4></section></summary><div class='docblock'>Performs the <code>|</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOr.html#tymethod.bitor">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOrAssign%3C%26BitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="impl"><a href="#impl-BitOrAssign%3C%26BitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html" title="trait core::ops::bit::BitOrAssign">BitOrAssign</a>&lt;&amp;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;&gt; for <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.bitor_assign-1" class="method trait-impl"><a href="#method.bitor_assign-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html#tymethod.bitor_assign" class="fn">bitor_assign</a>(&amp;mut self, rhs: &amp;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;)</h4></section></summary><div class='docblock'>Performs the <code>|=</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html#tymethod.bitor_assign">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOrAssign%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="impl"><a href="#impl-BitOrAssign%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html" title="trait core::ops::bit::BitOrAssign">BitOrAssign</a>&lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;&gt; for <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.bitor_assign" class="method trait-impl"><a href="#method.bitor_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html#tymethod.bitor_assign" class="fn">bitor_assign</a>(&amp;mut self, rhs: <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;)</h4></section></summary><div class='docblock'>Performs the <code>|=</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html#tymethod.bitor_assign">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOrAssign%3CRhs%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-BitOrAssign%3CRhs%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O, Rhs&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html" title="trait core::ops::bit::BitOrAssign">BitOrAssign</a>&lt;Rhs&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html" title="trait core::ops::bit::BitOrAssign">BitOrAssign</a>&lt;Rhs&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitor_assign-2" class="method trait-impl"><a href="#method.bitor_assign-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html#tymethod.bitor_assign" class="fn">bitor_assign</a>(&amp;mut self, rhs: Rhs)</h4></section></summary><div class='docblock'>Performs the <code>|=</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html#tymethod.bitor_assign">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitXor%3CRhs%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-BitXor%3CRhs%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O, Rhs&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXor.html" title="trait core::ops::bit::BitXor">BitXor</a>&lt;Rhs&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html" title="trait core::ops::bit::BitXorAssign">BitXorAssign</a>&lt;Rhs&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl"><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXor.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>^</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.bitxor" class="method trait-impl"><a href="#method.bitxor" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXor.html#tymethod.bitxor" class="fn">bitxor</a>(self, rhs: Rhs) -&gt; &lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXor.html" title="trait core::ops::bit::BitXor">BitXor</a>&lt;Rhs&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXor.html#associatedtype.Output" title="type core::ops::bit::BitXor::Output">Output</a></h4></section></summary><div class='docblock'>Performs the <code>^</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXor.html#tymethod.bitxor">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitXorAssign%3C%26BitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="impl"><a href="#impl-BitXorAssign%3C%26BitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html" title="trait core::ops::bit::BitXorAssign">BitXorAssign</a>&lt;&amp;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;&gt; for <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.bitxor_assign-1" class="method trait-impl"><a href="#method.bitxor_assign-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html#tymethod.bitxor_assign" class="fn">bitxor_assign</a>(&amp;mut self, rhs: &amp;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;)</h4></section></summary><div class='docblock'>Performs the <code>^=</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html#tymethod.bitxor_assign">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitXorAssign%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="impl"><a href="#impl-BitXorAssign%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html" title="trait core::ops::bit::BitXorAssign">BitXorAssign</a>&lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;&gt; for <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.bitxor_assign" class="method trait-impl"><a href="#method.bitxor_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html#tymethod.bitxor_assign" class="fn">bitxor_assign</a>(&amp;mut self, rhs: <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;)</h4></section></summary><div class='docblock'>Performs the <code>^=</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html#tymethod.bitxor_assign">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitXorAssign%3CRhs%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-BitXorAssign%3CRhs%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O, Rhs&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html" title="trait core::ops::bit::BitXorAssign">BitXorAssign</a>&lt;Rhs&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html" title="trait core::ops::bit::BitXorAssign">BitXorAssign</a>&lt;Rhs&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitxor_assign-2" class="method trait-impl"><a href="#method.bitxor_assign-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html#tymethod.bitxor_assign" class="fn">bitxor_assign</a>(&amp;mut self, rhs: Rhs)</h4></section></summary><div class='docblock'>Performs the <code>^=</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html#tymethod.bitxor_assign">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Borrow%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.borrow" class="method trait-impl"><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; &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;BitSlice&lt;&lt;A as BitView&gt;::Store, O&gt;"></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" open><summary><section id="impl-BorrowMut%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-BorrowMut%3CBitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.borrow_mut" class="method trait-impl"><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; &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;mut BitSlice&lt;&lt;A as BitView&gt;::Store, O&gt;"></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" open><summary><section id="impl-Clone-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Clone-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, 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-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Debug-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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-Default-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Default-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.default" class="method trait-impl"><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -&gt; <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-DerefMut-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.deref_mut" class="method trait-impl"><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fn">deref_mut</a>(&amp;mut self) -&gt; &amp;mut &lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Display-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-2" class="method trait-impl"><a href="#method.fmt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.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.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CA%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-From%3CA%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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>(data: A) -&gt; <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, 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%3CBitArray%3CA,+O%3E%3E-for-BitBox%3C%3CA+as+BitView%3E::Store,+O%3E" class="impl"><a href="#impl-From%3CBitArray%3CA,+O%3E%3E-for-BitBox%3C%3CA+as+BitView%3E::Store,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;&gt; for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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>(array: <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;) -&gt; <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, 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%3CBitArray%3CA,+O%3E%3E-for-BitVec%3C%3CA+as+BitView%3E::Store,+O%3E" class="impl"><a href="#impl-From%3CBitArray%3CA,+O%3E%3E-for-BitVec%3C%3CA+as+BitView%3E::Store,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;&gt; for <a class="struct" href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec">BitVec</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><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>(array: <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;) -&gt; <a class="struct" href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec">BitVec</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; <a href="#" class="tooltip" data-notable-ty="BitVec&lt;&lt;A as BitView&gt;::Store, O&gt;"></a></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-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Hash-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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, hasher: <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-Index%3CIdx%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Index%3CIdx%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O, Idx&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;Idx&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;Idx&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl"><a href="#associatedtype.Output-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = &lt;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;Idx&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index" class="method trait-impl"><a href="#method.index" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&amp;self, index: Idx) -&gt; &amp;&lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;Idx&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CIdx%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-IndexMut%3CIdx%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O, Idx&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;Idx&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;Idx&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index_mut" class="method trait-impl"><a href="#method.index_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(
&amp;mut self,
index: Idx,
) -&gt; &amp;mut &lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;Idx&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26BitArray%3CA,+O%3E" class="impl"><a href="#impl-IntoIterator-for-%26BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, A, O&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> for &amp;'a <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
A: 'a + <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,</div></h3><div class="docblock"><p><a href="https://doc.rust-lang.org/std/primitive.array.html#impl-IntoIterator-1">Original</a></p>
</div></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.IntoIter-1" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = &lt;&amp;'a <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; as <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>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = &lt;&amp;'a <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; as <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>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-1" class="method trait-impl"><a href="#method.into_iter-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -&gt; &lt;&amp;'a <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt; as <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>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26mut+BitArray%3CA,+O%3E" class="impl"><a href="#impl-IntoIterator-for-%26mut+BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, A, O&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> for &amp;'a mut <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
A: 'a + <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,</div></h3><div class="docblock"><p><a href="https://doc.rust-lang.org/std/primitive.array.html#impl-IntoIterator-2">Original</a></p>
</div></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.IntoIter-2" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = &lt;&amp;'a mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; as <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>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle" open><summary><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = &lt;&amp;'a mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt; as <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>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-2" class="method trait-impl"><a href="#method.into_iter-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -&gt; &lt;&amp;'a mut <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt; as <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>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-IntoIterator-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&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> for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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><a href="https://doc.rust-lang.org/std/primitive.array.html#impl-IntoIterator">Original</a></p>
</div></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = IntoIter&lt;A, O&gt;</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = &lt;IntoIter&lt;A, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -&gt; &lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt; as <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>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-LowerHex-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-LowerHex-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html" title="trait core::fmt::LowerHex">LowerHex</a> for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-3" class="method trait-impl"><a href="#method.fmt-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.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.LowerHex.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Not-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Not-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Not.html" title="trait core::ops::bit::Not">Not</a> for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.Output-4" class="associatedtype trait-impl"><a href="#associatedtype.Output-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Not.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>!</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.not" class="method trait-impl"><a href="#method.not" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Not.html#tymethod.not" class="fn">not</a>(self) -&gt; &lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Not.html" title="trait core::ops::bit::Not">Not</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Not.html#associatedtype.Output" title="type core::ops::bit::Not::Output">Output</a></h4></section></summary><div class='docblock'>Performs the unary <code>!</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Not.html#tymethod.not">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Octal-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Octal-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html" title="trait core::fmt::Octal">Octal</a> for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-4" class="method trait-impl"><a href="#method.fmt-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.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.Octal.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Ord-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, 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%3CBitArray%3CA,+O2%3E%3E-for-BitSlice%3CT,+O1%3E" class="impl"><a href="#impl-PartialEq%3CBitArray%3CA,+O2%3E%3E-for-BitSlice%3CT,+O1%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O1, A, O2, T&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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O2&gt;&gt; for <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O1&gt;<div class="where">where
O1: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
O2: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O2&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-PartialEq%3CRhs%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-PartialEq%3CRhs%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O, Rhs&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;Rhs&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, 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;Rhs&gt;,
Rhs: ?<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.eq-1" class="method trait-impl"><a href="#method.eq-1" 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: <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>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-1" 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-1" 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%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="impl"><a href="#impl-PartialOrd%3CBitArray%3CA,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, T, 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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;&gt; for <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
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.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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, 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-PartialOrd%3CRhs%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-PartialOrd%3CRhs%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O, Rhs&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;Rhs&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, 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;Rhs&gt;,
Rhs: ?<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.partial_cmp-1" class="method trait-impl"><a href="#method.partial_cmp-1" 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: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Rhs</a>) -&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-1" 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-1" 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-1" 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-1" 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-1" 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-1" 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-1" 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-1" 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-TryFrom%3C%26BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-%26BitArray%3CA,+O%3E" class="impl"><a href="#impl-TryFrom%3C%26BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-%26BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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;&amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;&gt; for &amp;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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> = TryFromBitSliceError</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>(
src: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&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;&amp;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;, &lt;&amp;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, 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;&amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;&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%26BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-TryFrom%3C%26BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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;&amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;&gt; for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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> = TryFromBitSliceError</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>(
src: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;, &lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, 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;&amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;&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%26mut+BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-%26mut+BitArray%3CA,+O%3E" class="impl"><a href="#impl-TryFrom%3C%26mut+BitSlice%3C%3CA+as+BitView%3E::Store,+O%3E%3E-for-%26mut+BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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;&amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;&gt; for &amp;mut <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" 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> = TryFromBitSliceError</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 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>(
src: &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&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;&amp;mut <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;, &lt;&amp;mut <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, 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;&amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;&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-UpperHex-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-UpperHex-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a> for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-5" class="method trait-impl"><a href="#method.fmt-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.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.UpperHex.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-__Deref-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-__Deref-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&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> for <a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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.Target" class="associatedtype trait-impl"><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;&lt;A as <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitView</a>&gt;::<a class="associatedtype" href="trait._.html#associatedtype.Store" title="type common_base::bit_vec::prelude::_::Store">Store</a>, O&gt;</h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a href="#method.deref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref" class="fn">deref</a>(&amp;self) -&gt; &amp;&lt;<a class="struct" href="struct.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><section id="impl-Copy-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Copy-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</div></h3></section><section id="impl-Eq-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Eq-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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-Unpin-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Unpin-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitViewSized</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-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Freeze-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <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-BitArray%3CA,+O%3E" class="impl"><a href="#impl-RefUnwindSafe-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
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>,
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>,</div></h3></section><section id="impl-Send-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Send-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
O: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h3></section><section id="impl-Sync-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-Sync-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, O&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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
O: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section><section id="impl-UnwindSafe-for-BitArray%3CA,+O%3E" class="impl"><a href="#impl-UnwindSafe-for-BitArray%3CA,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A, 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.BitArray.html" title="struct common_base::bit_vec::prelude::BitArray">BitArray</a>&lt;A, O&gt;<div class="where">where
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>,
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>,</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-1" 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-1" 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-1" 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-1" 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-3" 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-3" 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-Receiver-for-P" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/ops/deref.rs.html#378-380">Source</a><a href="#impl-Receiver-for-P" class="anchor">§</a><h3 class="code-header">impl&lt;P, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Receiver.html" title="trait core::ops::deref::Receiver">Receiver</a> for P<div class="where">where
P: <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; + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</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></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/ops/deref.rs.html#382">Source</a><a href="#associatedtype.Target-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Receiver.html#associatedtype.Target" class="associatedtype">Target</a> = T</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>arbitrary_self_types</code>)</span></div></span><div class='docblock'>The target type on which the method may be called.</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-ToString-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2783">Source</a><a href="#impl-ToString-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<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.to_string" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2785">Source</a><a href="#method.to_string" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string" class="fn">to_string</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">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-4" 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-4" 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-3" 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-3" 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-3" 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-3" 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-CloneAnySend-for-T" class="impl"><a href="#impl-CloneAnySend-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; CloneAnySend 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/marker/trait.Send.html" title="trait core::marker::Send">Send</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-CloneAnySendSync-for-T" class="impl"><a href="#impl-CloneAnySendSync-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; CloneAnySendSync 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/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</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-CloneAnySync-for-T" class="impl"><a href="#impl-CloneAnySync-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; CloneAnySync 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/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</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><script type="text/json" id="notable-traits-data">{"&BitSlice<<A as BitView>::Store, O>":"<h3>Notable traits for <code>&amp;<a class=\"struct\" href=\"struct.BitSlice.html\" title=\"struct common_base::bit_vec::prelude::BitSlice\">BitSlice</a>&lt;T, O&gt;</code></h3><pre><code><div class=\"where\">impl&lt;T, O&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;<a class=\"struct\" href=\"struct.BitSlice.html\" title=\"struct common_base::bit_vec::prelude::BitSlice\">BitSlice</a>&lt;T, O&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"trait.BitStore.html\" title=\"trait common_base::bit_vec::prelude::BitStore\">BitStore</a>,\n O: <a class=\"trait\" href=\"trait.BitOrder.html\" title=\"trait common_base::bit_vec::prelude::BitOrder\">BitOrder</a>,\n <a class=\"struct\" href=\"struct.BitSlice.html\" title=\"struct common_base::bit_vec::prelude::BitSlice\">BitSlice</a>&lt;T, O&gt;: <a class=\"trait\" href=\"trait._.html\" title=\"trait common_base::bit_vec::prelude::_\">BitField</a>,</div></div>","&mut BitSlice<<A as BitView>::Store, O>":"<h3>Notable traits for <code>&amp;mut <a class=\"struct\" href=\"struct.BitSlice.html\" title=\"struct common_base::bit_vec::prelude::BitSlice\">BitSlice</a>&lt;T, O&gt;</code></h3><pre><code><div class=\"where\">impl&lt;T, O&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &amp;mut <a class=\"struct\" href=\"struct.BitSlice.html\" title=\"struct common_base::bit_vec::prelude::BitSlice\">BitSlice</a>&lt;T, O&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"trait.BitStore.html\" title=\"trait common_base::bit_vec::prelude::BitStore\">BitStore</a>,\n O: <a class=\"trait\" href=\"trait.BitOrder.html\" title=\"trait common_base::bit_vec::prelude::BitOrder\">BitOrder</a>,\n <a class=\"struct\" href=\"struct.BitSlice.html\" title=\"struct common_base::bit_vec::prelude::BitSlice\">BitSlice</a>&lt;T, O&gt;: <a class=\"trait\" href=\"trait._.html\" title=\"trait common_base::bit_vec::prelude::_\">BitField</a>,</div></div>","BitPtrRange<Const, T, O>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.BitPtrRange.html\" title=\"struct common_base::bit_vec::prelude::BitPtrRange\">BitPtrRange</a>&lt;M, T, O&gt;</code></h3><pre><code><div class=\"where\">impl&lt;M, T, O&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.BitPtrRange.html\" title=\"struct common_base::bit_vec::prelude::BitPtrRange\">BitPtrRange</a>&lt;M, T, O&gt;<div class=\"where\">where\n M: Mutability,\n T: <a class=\"trait\" href=\"trait.BitStore.html\" title=\"trait common_base::bit_vec::prelude::BitStore\">BitStore</a>,\n O: <a class=\"trait\" href=\"trait.BitOrder.html\" title=\"trait common_base::bit_vec::prelude::BitOrder\">BitOrder</a>,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"struct.BitPtr.html\" title=\"struct common_base::bit_vec::prelude::BitPtr\">BitPtr</a>&lt;M, T, O&gt;;</div>","BitPtrRange<Mut, T, O>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.BitPtrRange.html\" title=\"struct common_base::bit_vec::prelude::BitPtrRange\">BitPtrRange</a>&lt;M, T, O&gt;</code></h3><pre><code><div class=\"where\">impl&lt;M, T, O&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.BitPtrRange.html\" title=\"struct common_base::bit_vec::prelude::BitPtrRange\">BitPtrRange</a>&lt;M, T, O&gt;<div class=\"where\">where\n M: Mutability,\n T: <a class=\"trait\" href=\"trait.BitStore.html\" title=\"trait common_base::bit_vec::prelude::BitStore\">BitStore</a>,\n O: <a class=\"trait\" href=\"trait.BitOrder.html\" title=\"trait common_base::bit_vec::prelude::BitOrder\">BitOrder</a>,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"struct.BitPtr.html\" title=\"struct common_base::bit_vec::prelude::BitPtr\">BitPtr</a>&lt;M, T, O&gt;;</div>","BitVec<<A as BitView>::Store, O>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.BitVec.html\" title=\"struct common_base::bit_vec::prelude::BitVec\">BitVec</a>&lt;T, O&gt;</code></h3><pre><code><div class=\"where\">impl&lt;T, O&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for <a class=\"struct\" href=\"struct.BitVec.html\" title=\"struct common_base::bit_vec::prelude::BitVec\">BitVec</a>&lt;T, O&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"trait.BitStore.html\" title=\"trait common_base::bit_vec::prelude::BitStore\">BitStore</a>,\n O: <a class=\"trait\" href=\"trait.BitOrder.html\" title=\"trait common_base::bit_vec::prelude::BitOrder\">BitOrder</a>,\n <a class=\"struct\" href=\"struct.BitSlice.html\" title=\"struct common_base::bit_vec::prelude::BitSlice\">BitSlice</a>&lt;T, O&gt;: <a class=\"trait\" href=\"trait._.html\" title=\"trait common_base::bit_vec::prelude::_\">BitField</a>,</div></div><div class=\"where\">impl&lt;T, O&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"struct.BitVec.html\" title=\"struct common_base::bit_vec::prelude::BitVec\">BitVec</a>&lt;T, O&gt;<div class=\"where\">where\n O: <a class=\"trait\" href=\"trait.BitOrder.html\" title=\"trait common_base::bit_vec::prelude::BitOrder\">BitOrder</a>,\n T: <a class=\"trait\" href=\"trait.BitStore.html\" title=\"trait common_base::bit_vec::prelude::BitStore\">BitStore</a>,\n <a class=\"struct\" href=\"struct.BitSlice.html\" title=\"struct common_base::bit_vec::prelude::BitSlice\">BitSlice</a>&lt;T, O&gt;: <a class=\"trait\" href=\"trait._.html\" title=\"trait common_base::bit_vec::prelude::_\">BitField</a>,</div></div>","BitVec<<T as BitStore>::Unalias, O>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.BitVec.html\" title=\"struct common_base::bit_vec::prelude::BitVec\">BitVec</a>&lt;T, O&gt;</code></h3><pre><code><div class=\"where\">impl&lt;T, O&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for <a class=\"struct\" href=\"struct.BitVec.html\" title=\"struct common_base::bit_vec::prelude::BitVec\">BitVec</a>&lt;T, O&gt;<div class=\"where\">where\n T: <a class=\"trait\" href=\"trait.BitStore.html\" title=\"trait common_base::bit_vec::prelude::BitStore\">BitStore</a>,\n O: <a class=\"trait\" href=\"trait.BitOrder.html\" title=\"trait common_base::bit_vec::prelude::BitOrder\">BitOrder</a>,\n <a class=\"struct\" href=\"struct.BitSlice.html\" title=\"struct common_base::bit_vec::prelude::BitSlice\">BitSlice</a>&lt;T, O&gt;: <a class=\"trait\" href=\"trait._.html\" title=\"trait common_base::bit_vec::prelude::_\">BitField</a>,</div></div><div class=\"where\">impl&lt;T, O&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"struct.BitVec.html\" title=\"struct common_base::bit_vec::prelude::BitVec\">BitVec</a>&lt;T, O&gt;<div class=\"where\">where\n O: <a class=\"trait\" href=\"trait.BitOrder.html\" title=\"trait common_base::bit_vec::prelude::BitOrder\">BitOrder</a>,\n T: <a class=\"trait\" href=\"trait.BitStore.html\" title=\"trait common_base::bit_vec::prelude::BitStore\">BitStore</a>,\n <a class=\"struct\" href=\"struct.BitSlice.html\" title=\"struct common_base::bit_vec::prelude::BitSlice\">BitSlice</a>&lt;T, O&gt;: <a class=\"trait\" href=\"trait._.html\" title=\"trait common_base::bit_vec::prelude::_\">BitField</a>,</div></div>"}</script></section></div></main></body></html>