Files
greptimedb/common_base/bit_vec/prelude/struct.BitBox.html
2025-12-18 14:53:29 +00:00

2233 lines
454 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="Fixed-Size, Heap-Allocated, Bit Slice"><title>BitBox 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="#">BitBox</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="#">BitBox</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#fixed-size-heap-allocated-bit-slice" title="Fixed-Size, Heap-Allocated, Bit Slice">Fixed-Size, Heap-Allocated, Bit Slice</a><ul><li><a href="#original" title="Original">Original</a></li><li><a href="#api-differences" title="API Differences">API Differences</a></li><li><a href="#behavior" title="Behavior">Behavior</a></li><li><a href="#safety" title="Safety">Safety</a></li><li><a href="#construction" title="Construction">Construction</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.bitspan" title="bitspan">bitspan</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_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.fill_uninitialized" title="fill_uninitialized">fill_uninitialized</a></li><li><a href="#method.force_align" title="force_align">force_align</a></li><li><a href="#method.from_bitslice" title="from_bitslice">from_bitslice</a></li><li><a href="#method.from_boxed_slice" title="from_boxed_slice">from_boxed_slice</a></li><li><a href="#method.from_raw" title="from_raw">from_raw</a></li><li><a href="#method.into_bitvec" title="into_bitvec">into_bitvec</a></li><li><a href="#method.into_boxed_slice" title="into_boxed_slice">into_boxed_slice</a></li><li><a href="#method.into_raw" title="into_raw">into_raw</a></li><li><a href="#method.leak" title="leak">leak</a></li><li><a href="#method.try_from_boxed_slice" title="try_from_boxed_slice">try_from_boxed_slice</a></li></ul><h3><a href="#deref-methods-BitSlice%3CT,+O%3E">Methods from Deref&lt;<wbr>Target=<wbr>BitSlice&lt;<wbr>T, 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" 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" 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%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" title="AsMut&#60;BitSlice&#60;T, O&#62;&#62;">AsMut&#60;BitSlice&#60;T, O&#62;&#62;</a></li><li><a href="#impl-AsRef%3CBitSlice%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" title="AsRef&#60;BitSlice&#60;T, O&#62;&#62;">AsRef&#60;BitSlice&#60;T, O&#62;&#62;</a></li><li><a href="#impl-Binary-for-BitBox%3CT,+O%3E" title="Binary">Binary</a></li><li><a href="#impl-BitAnd%3CRhs%3E-for-BitBox%3CT,+O%3E" title="BitAnd&#60;Rhs&#62;">BitAnd&#60;Rhs&#62;</a></li><li><a href="#impl-BitAndAssign%3C%26BitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" title="BitAndAssign&#60;&#38;BitBox&#60;T, O&#62;&#62;">BitAndAssign&#60;&#38;BitBox&#60;T, O&#62;&#62;</a></li><li><a href="#impl-BitAndAssign%3CBitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" title="BitAndAssign&#60;BitBox&#60;T, O&#62;&#62;">BitAndAssign&#60;BitBox&#60;T, O&#62;&#62;</a></li><li><a href="#impl-BitAndAssign%3CRhs%3E-for-BitBox%3CT,+O%3E" title="BitAndAssign&#60;Rhs&#62;">BitAndAssign&#60;Rhs&#62;</a></li><li><a href="#impl-BitField-for-BitBox%3CT,+O%3E" title="BitField">BitField</a></li><li><a href="#impl-BitOr%3CRhs%3E-for-BitBox%3CT,+O%3E" title="BitOr&#60;Rhs&#62;">BitOr&#60;Rhs&#62;</a></li><li><a href="#impl-BitOrAssign%3C%26BitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" title="BitOrAssign&#60;&#38;BitBox&#60;T, O&#62;&#62;">BitOrAssign&#60;&#38;BitBox&#60;T, O&#62;&#62;</a></li><li><a href="#impl-BitOrAssign%3CBitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" title="BitOrAssign&#60;BitBox&#60;T, O&#62;&#62;">BitOrAssign&#60;BitBox&#60;T, O&#62;&#62;</a></li><li><a href="#impl-BitOrAssign%3CRhs%3E-for-BitBox%3CT,+O%3E" title="BitOrAssign&#60;Rhs&#62;">BitOrAssign&#60;Rhs&#62;</a></li><li><a href="#impl-BitXor%3CRhs%3E-for-BitBox%3CT,+O%3E" title="BitXor&#60;Rhs&#62;">BitXor&#60;Rhs&#62;</a></li><li><a href="#impl-BitXorAssign%3C%26BitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" title="BitXorAssign&#60;&#38;BitBox&#60;T, O&#62;&#62;">BitXorAssign&#60;&#38;BitBox&#60;T, O&#62;&#62;</a></li><li><a href="#impl-BitXorAssign%3CBitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" title="BitXorAssign&#60;BitBox&#60;T, O&#62;&#62;">BitXorAssign&#60;BitBox&#60;T, O&#62;&#62;</a></li><li><a href="#impl-BitXorAssign%3CRhs%3E-for-BitBox%3CT,+O%3E" title="BitXorAssign&#60;Rhs&#62;">BitXorAssign&#60;Rhs&#62;</a></li><li><a href="#impl-Borrow%3CBitSlice%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" title="Borrow&#60;BitSlice&#60;T, O&#62;&#62;">Borrow&#60;BitSlice&#60;T, O&#62;&#62;</a></li><li><a href="#impl-BorrowMut%3CBitSlice%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" title="BorrowMut&#60;BitSlice&#60;T, O&#62;&#62;">BorrowMut&#60;BitSlice&#60;T, O&#62;&#62;</a></li><li><a href="#impl-Clone-for-BitBox%3CT,+O%3E" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-BitBox%3CT,+O%3E" title="Debug">Debug</a></li><li><a href="#impl-Default-for-BitBox%3CT,+O%3E" title="Default">Default</a></li><li><a href="#impl-__Deref-for-BitBox%3CT,+O%3E" title="Deref">Deref</a></li><li><a href="#impl-DerefMut-for-BitBox%3CT,+O%3E" title="DerefMut">DerefMut</a></li><li><a href="#impl-Display-for-BitBox%3CT,+O%3E" title="Display">Display</a></li><li><a href="#impl-Drop-for-BitBox%3CT,+O%3E" title="Drop">Drop</a></li><li><a href="#impl-Eq-for-BitBox%3CT,+O%3E" title="Eq">Eq</a></li><li><a href="#impl-From%3C%26BitSlice%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" title="From&#60;&#38;BitSlice&#60;T, O&#62;&#62;">From&#60;&#38;BitSlice&#60;T, O&#62;&#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%3CBitBox%3CT,+O%3E%3E-for-BitVec%3CT,+O%3E" title="From&#60;BitBox&#60;T, O&#62;&#62;">From&#60;BitBox&#60;T, O&#62;&#62;</a></li><li><a href="#impl-From%3CBitVec%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" title="From&#60;BitVec&#60;T, O&#62;&#62;">From&#60;BitVec&#60;T, O&#62;&#62;</a></li><li><a href="#impl-From%3CBox%3CT%3E%3E-for-BitBox%3CT,+O%3E" title="From&#60;Box&#60;T&#62;&#62;">From&#60;Box&#60;T&#62;&#62;</a></li><li><a href="#impl-From%3CCow%3C'a,+BitSlice%3CT,+O%3E%3E%3E-for-BitBox%3CT,+O%3E" title="From&#60;Cow&#60;&#39;a, BitSlice&#60;T, O&#62;&#62;&#62;">From&#60;Cow&#60;&#39;a, BitSlice&#60;T, O&#62;&#62;&#62;</a></li><li><a href="#impl-FromIterator%3CI%3E-for-BitBox%3CT,+O%3E" title="FromIterator&#60;I&#62;">FromIterator&#60;I&#62;</a></li><li><a href="#impl-Hash-for-BitBox%3CT,+O%3E" title="Hash">Hash</a></li><li><a href="#impl-Index%3CIdx%3E-for-BitBox%3CT,+O%3E" title="Index&#60;Idx&#62;">Index&#60;Idx&#62;</a></li><li><a href="#impl-IndexMut%3CIdx%3E-for-BitBox%3CT,+O%3E" title="IndexMut&#60;Idx&#62;">IndexMut&#60;Idx&#62;</a></li><li><a href="#impl-IntoIterator-for-BitBox%3CT,+O%3E" title="IntoIterator">IntoIterator</a></li><li><a href="#impl-LowerHex-for-BitBox%3CT,+O%3E" title="LowerHex">LowerHex</a></li><li><a href="#impl-Not-for-BitBox%3CT,+O%3E" title="Not">Not</a></li><li><a href="#impl-Octal-for-BitBox%3CT,+O%3E" title="Octal">Octal</a></li><li><a href="#impl-Ord-for-BitBox%3CT,+O%3E" title="Ord">Ord</a></li><li><a href="#impl-PartialEq%3CBitBox%3CT2,+O2%3E%3E-for-%26BitSlice%3CT1,+O1%3E" title="PartialEq&#60;BitBox&#60;T2, O2&#62;&#62;">PartialEq&#60;BitBox&#60;T2, O2&#62;&#62;</a></li><li><a href="#impl-PartialEq%3CBitBox%3CT2,+O2%3E%3E-for-%26mut+BitSlice%3CT1,+O1%3E" title="PartialEq&#60;BitBox&#60;T2, O2&#62;&#62;">PartialEq&#60;BitBox&#60;T2, O2&#62;&#62;</a></li><li><a href="#impl-PartialEq%3CBitBox%3CT2,+O2%3E%3E-for-BitSlice%3CT1,+O1%3E" title="PartialEq&#60;BitBox&#60;T2, O2&#62;&#62;">PartialEq&#60;BitBox&#60;T2, O2&#62;&#62;</a></li><li><a href="#impl-PartialEq%3CRhs%3E-for-BitBox%3CT,+O%3E" title="PartialEq&#60;Rhs&#62;">PartialEq&#60;Rhs&#62;</a></li><li><a href="#impl-PartialOrd%3CBitBox%3CT2,+O2%3E%3E-for-%26BitSlice%3CT1,+O1%3E" title="PartialOrd&#60;BitBox&#60;T2, O2&#62;&#62;">PartialOrd&#60;BitBox&#60;T2, O2&#62;&#62;</a></li><li><a href="#impl-PartialOrd%3CBitBox%3CT2,+O2%3E%3E-for-%26mut+BitSlice%3CT1,+O1%3E" title="PartialOrd&#60;BitBox&#60;T2, O2&#62;&#62;">PartialOrd&#60;BitBox&#60;T2, O2&#62;&#62;</a></li><li><a href="#impl-PartialOrd%3CBitBox%3CT2,+O2%3E%3E-for-BitSlice%3CT1,+O1%3E" title="PartialOrd&#60;BitBox&#60;T2, O2&#62;&#62;">PartialOrd&#60;BitBox&#60;T2, O2&#62;&#62;</a></li><li><a href="#impl-PartialOrd%3CRhs%3E-for-BitBox%3CT,+O%3E" title="PartialOrd&#60;Rhs&#62;">PartialOrd&#60;Rhs&#62;</a></li><li><a href="#impl-Pointer-for-BitBox%3CT,+O%3E" title="Pointer">Pointer</a></li><li><a href="#impl-Send-for-BitBox%3CT,+O%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-BitBox%3CT,+O%3E" title="Sync">Sync</a></li><li><a href="#impl-TryFrom%3CBox%3C%5BT%5D%3E%3E-for-BitBox%3CT,+O%3E" title="TryFrom&#60;Box&#60;[T]&#62;&#62;">TryFrom&#60;Box&#60;[T]&#62;&#62;</a></li><li><a href="#impl-Unpin-for-BitBox%3CT,+O%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UpperHex-for-BitBox%3CT,+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-BitBox%3CT,+O%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-BitBox%3CT,+O%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-BitBox%3CT,+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-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">BitBox</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 BitBox&lt;T = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, O = <a class="struct" href="struct.LocalBits.html" title="struct common_base::bit_vec::prelude::LocalBits">Lsb0</a>&gt;<div class="where">where
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>{
bitspan: BitSpan&lt;Mut, T, O&gt;,
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="fixed-size-heap-allocated-bit-slice"><a class="doc-anchor" href="#fixed-size-heap-allocated-bit-slice">§</a>Fixed-Size, Heap-Allocated, Bit Slice</h2>
<p><code>BitBox</code> is a heap-allocated <a href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice"><code>BitSlice</code></a> region. It is a distinct type because
the implementation of bit-slice pointers means that <code>Box&lt;BitSlice&gt;</code> cannot
exist. It can be created by cloning a bit-slice into the heap, or by freezing
the allocation of a <a href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec"><code>BitVec</code></a></p>
<h3 id="original"><a class="doc-anchor" href="#original">§</a>Original</h3>
<p><a href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box"><code>Box&lt;[T]&gt;</code></a></p>
<h3 id="api-differences"><a class="doc-anchor" href="#api-differences">§</a>API Differences</h3>
<p>As with <code>BitSlice</code>, this takes a pair of <a href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder"><code>BitOrder</code></a> and <a href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore"><code>BitStore</code></a> type
parameters to govern the buffers memory representation. Because <code>BitSlice</code> is
unsized, <code>BitBox</code> has almost none of the <code>Box</code> API, and is difficult to use
directly.</p>
<h3 id="behavior"><a class="doc-anchor" href="#behavior">§</a>Behavior</h3>
<p><code>BitBox</code>, like <code>&amp;BitSlice</code>, is an opaque pointer to a bit-addressed slice
region. Unlike <code>&amp;BitSlice</code>, it uses the allocator to guarantee that it is the
sole accessor to the referent buffer, and is able to use that uniqueness
guarantee to specialize some <code>BitSlice</code> behavior to be faster or more efficient.</p>
<h3 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h3>
<p><code>BitBox</code> is, essentially, a <code>NonNull&lt;BitSlice&lt;T, O&gt;&gt;</code> pointer. The internal
value is opaque and cannot be inspected or modified by user code.</p>
<p>If you attempt to do so, your program becomes inconsistent. You will likely
break the allocators internal state and cause a crash. No guarantees of crash
<em>or</em> recovery are provided. Do not inspect or modify the <code>BitBox</code> handle value.</p>
<h3 id="construction"><a class="doc-anchor" href="#construction">§</a>Construction</h3>
<p>The simplest way to construct a <code>BitBox</code> is by using the <a href="macro.bitbox.html" title="macro common_base::bit_vec::prelude::bitbox"><code>bitbox!</code></a> macro. You
can also explicitly clone a <code>BitSlice</code> with <a href="struct.BitBox.html#method.from_bitslice" title="associated function common_base::bit_vec::prelude::BitBox::from_bitslice"><code>BitBox::from_bitslice</code></a>, or freeze
a <code>BitVec</code> with <a href="struct.BitVec.html#method.into_boxed_bitslice" title="method common_base::bit_vec::prelude::BitVec::into_boxed_bitslice"><code>BitVec::into_boxed_bitslice</code></a>.</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">let </span>a = BitBox::from_bitslice(<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="kw">let </span>b = <span class="macro">bitbox!</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>b_raw: <span class="kw-2">*mut </span>BitSlice = BitBox::into_raw(b);
<span class="kw">let </span>b_reformed = <span class="kw">unsafe </span>{ BitBox::from_raw(b_raw) };</code></pre></div></div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.bitspan" class="structfield section-header"><a href="#structfield.bitspan" class="anchor field">§</a><code>bitspan: BitSpan&lt;Mut, T, O&gt;</code></span><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-BitBox%3CT,+O%3E" class="impl"><a href="#impl-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_raw" class="method"><h4 class="code-header">pub unsafe fn <a href="#method.from_raw" class="fn">from_raw</a>(raw: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;) -&gt; <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;</h4></section></summary><div class="docblock"><p>Constructs a bit-box from a raw bit-slice pointer.</p>
<p>This converts a <code>*mut BitSlice</code> pointer that had previously been
produced by either <a href="struct.BitBox.html#method.into_raw" title="associated function common_base::bit_vec::prelude::BitBox::into_raw"><code>::into_raw()</code></a> or <a href="struct.BitBox.html#method.leak" title="associated function common_base::bit_vec::prelude::BitBox::leak"><code>::leak()</code></a> and restores the
bit-box containing it.</p>
<h6 id="original-1"><a class="doc-anchor" href="#original-1">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.from_raw" title="associated function alloc::boxed::Box::from_raw"><code>Box::from_raw</code></a></p>
<h6 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h6>
<p>You must only call this function on pointers produced by leaking a prior
<code>BitBox</code>; you may not modify the value of a pointer returned by
<a href="struct.BitBox.html#method.into_raw" title="associated function common_base::bit_vec::prelude::BitBox::into_raw"><code>::into_raw()</code></a>, nor may you conjure pointer values of your own. Doing
so will corrupt the allocator state.</p>
<p>You must only call this function on any given leaked pointer at most
once. Not calling it at all will merely render the allocated memory
unreachable for the duration of the program runtime, a normal (and safe)
memory leak. Calling it once restores ordinary functionality, and
ensures ordinary destruction at or before program termination. However,
calling it more than once on the same pointer will introduce data races,
use-after-free, and/or double-free errors.</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>bb = <span class="macro">bitbox!</span>[<span class="number">0</span>; <span class="number">80</span>];
<span class="kw">let </span>ptr: <span class="kw-2">*mut </span>BitSlice = BitBox::into_raw(bb);
<span class="kw">let </span>bb = <span class="kw">unsafe </span>{ BitBox::from_raw(ptr) };
<span class="comment">// unsafe { BitBox::from_raw(ptr) }; // UAF crash!</span></code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.into_raw" class="method"><h4 class="code-header">pub fn <a href="#method.into_raw" class="fn">into_raw</a>(this: <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><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>Consumes the bit-box, returning a raw bit-slice pointer.</p>
<p>Bit-slice pointers are always correctly encoded and non-null. The
referent region is dereferenceäble *as a <code>BitSlice</code> for the remainder of
the program, or until it is first passed to <a href="struct.BitBox.html#method.from_raw" title="associated function common_base::bit_vec::prelude::BitBox::from_raw"><code>::from_raw()</code></a>, whichever
comes first. Once the pointer is first passed to <code>::from_raw()</code>, all
copies of that pointer become invalid to dereference.</p>
<h6 id="original-2"><a class="doc-anchor" href="#original-2">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.into_raw" title="associated function alloc::boxed::Box::into_raw"><code>Box::into_raw</code></a></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>bb = <span class="macro">bitbox!</span>[<span class="number">0</span>; <span class="number">80</span>];
<span class="kw">let </span>ptr = BitBox::into_raw(bb);
<span class="kw">let </span>bb = <span class="kw">unsafe </span>{ BitBox::from_raw(ptr) };</code></pre></div>
<p>You <strong>may not</strong> deällocate pointers produced by this function through
any other means.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.leak" class="method"><h4 class="code-header">pub fn <a href="#method.leak" class="fn">leak</a>&lt;'a&gt;(this: <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;) -&gt; &amp;'a mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;&#39;a mut BitSlice&lt;T, O&gt;"></a><div class="where">where
T: 'a,</div></h4></section></summary><div class="docblock"><p>Deliberately leaks the allocated memory, returning an
<code>&amp;'static mut BitSlice</code> reference.</p>
<p>This differs from <a href="struct.BitBox.html#method.into_raw" title="associated function common_base::bit_vec::prelude::BitBox::into_raw"><code>::into_raw()</code></a> in that the reference is safe to use
and can be tracked by the Rust borrow-checking system. Like the
bit-slice pointer produced by <code>::into_raw()</code>, this reference can be
un-leaked by passing it into <a href="struct.BitBox.html#method.from_raw" title="associated function common_base::bit_vec::prelude::BitBox::from_raw"><code>::from_raw()</code></a> to reclaim the memory.</p>
<h6 id="original-3"><a class="doc-anchor" href="#original-3">§</a>Original</h6>
<p><a href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.leak" title="associated function alloc::boxed::Box::leak"><code>Box::leak</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="kw">let </span>bb = <span class="macro">bitbox!</span>[<span class="number">0</span>; <span class="number">80</span>];
<span class="kw">let </span>static_ref: <span class="kw-2">&amp;</span><span class="lifetime">'static </span><span class="kw-2">mut </span>BitSlice = BitBox::leak(bb);
static_ref.set(<span class="number">0</span>, <span class="bool-val">true</span>);
<span class="macro">assert!</span>(static_ref[<span class="number">0</span>]);
<span class="kw">let _ </span>= <span class="kw">unsafe </span>{
BitBox::from_raw(static_ref)
};</code></pre></div></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitBox%3CT,+O%3E-1" class="impl"><a href="#impl-BitBox%3CT,+O%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_bitslice" class="method"><h4 class="code-header">pub fn <a href="#method.from_bitslice" class="fn">from_bitslice</a>(slice: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;) -&gt; <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;</h4></section></summary><div class="docblock"><p>Copies a bit-slice region into a new bit-box allocation.</p>
<p>The referent memory is <code>memcpy</code>d into the heap, exactly preserving the
original bit-slices memory layout and contents. This allows the
function to run as fast as possible, but misaligned source bit-slices
may result in decreased performance or unexpected layout behavior during
use. You can use <a href="struct.BitBox.html#method.force_align" title="method common_base::bit_vec::prelude::BitBox::force_align"><code>.force_align()</code></a> to ensure that the referent
bit-slice is aligned in memory.</p>
<h6 id="notes"><a class="doc-anchor" href="#notes">§</a>Notes</h6>
<p>Bits in the allocation of the source bit-slice, but outside its own
description of that memory, have an <strong>unspecified</strong>, but initialized,
value. You may not rely on their contents in any way, and you <em>should</em>
call <a href="struct.BitBox.html#method.force_align" title="method common_base::bit_vec::prelude::BitBox::force_align"><code>.force_align()</code></a> and/or <a href="struct.BitBox.html#method.fill_uninitialized" title="method common_base::bit_vec::prelude::BitBox::fill_uninitialized"><code>.fill_uninitialized()</code></a> if you are
going to inspect the underlying memory of the new allocation.</p>
<h6 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h6>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bitvec::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>data = <span class="number">0b0101_1011u8</span>;
<span class="kw">let </span>bits = data.view_bits::&lt;Msb0&gt;();
<span class="kw">let </span>bb = BitBox::from_bitslice(<span class="kw-2">&amp;</span>bits[<span class="number">2 </span>..]);
<span class="macro">assert_eq!</span>(bb, bits[<span class="number">2 </span>..]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.from_boxed_slice" class="method"><h4 class="code-header">pub fn <a href="#method.from_boxed_slice" class="fn">from_boxed_slice</a>(boxed: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;) -&gt; <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;</h4></section></summary><div class="docblock"><p>Converts a <code>Box&lt;[T]&gt;</code> into a <code>BitBox&lt;T, O&gt;</code>, in place.</p>
<p>This does not affect the referent buffer, and only transforms the
handle.</p>
<h6 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h6>
<p>This panics if the provided <code>boxed</code> slice is too long to view as a
bit-slice region.</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>boxed: Box&lt;[u8]&gt; = Box::new([<span class="number">0</span>; <span class="number">40</span>]);
<span class="kw">let </span>addr = boxed.as_ptr();
<span class="kw">let </span>bb = BitBox::&lt;u8&gt;::from_boxed_slice(boxed);
<span class="macro">assert_eq!</span>(bb, <span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">320</span>]);
<span class="macro">assert_eq!</span>(addr, bb.as_raw_slice().as_ptr());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_from_boxed_slice" class="method"><h4 class="code-header">pub fn <a href="#method.try_from_boxed_slice" class="fn">try_from_boxed_slice</a>(boxed: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Attempts to convert an ordinary boxed slice into a boxed bit-slice.</p>
<p>This does not perform a copy or reällocation; it only attempts to
transform the handle. Because <code>Box&lt;[T]&gt;</code> can be longer than <code>BitBox</code>es,
it may fail, and will return the original handle if it does.</p>
<p>It is unlikely that you have a single <code>Box&lt;[_]&gt;</code> that is too large to
convert into a bit-box. You can find the length restrictions as the
bit-slice associated constants <a href="struct.BitSlice.html#associatedconstant.MAX_BITS" title="associated constant common_base::bit_vec::prelude::BitSlice::MAX_BITS"><code>MAX_BITS</code></a> and <a href="struct.BitSlice.html#associatedconstant.MAX_ELTS" title="associated constant common_base::bit_vec::prelude::BitSlice::MAX_ELTS"><code>MAX_ELTS</code></a>.</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>boxed: Box&lt;[u8]&gt; = Box::new([<span class="number">0u8</span>; <span class="number">40</span>]);
<span class="kw">let </span>addr = boxed.as_ptr();
<span class="kw">let </span>bb = BitBox::&lt;u8&gt;::try_from_boxed_slice(boxed).unwrap();
<span class="macro">assert_eq!</span>(bb, <span class="macro">bits!</span>[<span class="number">0</span>; <span class="number">320</span>]);
<span class="macro">assert_eq!</span>(addr, bb.as_raw_slice().as_ptr());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.into_boxed_slice" class="method"><h4 class="code-header">pub fn <a href="#method.into_boxed_slice" class="fn">into_boxed_slice</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;</h4></section></summary><div class="docblock"><p>Converts the bit-box back into an ordinary boxed element slice.</p>
<p>This does not touch the allocator or the buffer contents; it is purely a
handle transform.</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>bb = <span class="macro">bitbox!</span>[<span class="number">0</span>; <span class="number">5</span>];
<span class="kw">let </span>addr = bb.as_raw_slice().as_ptr();
<span class="kw">let </span>boxed = bb.into_boxed_slice();
<span class="macro">assert_eq!</span>(boxed[..], [<span class="number">0</span>][..]);
<span class="macro">assert_eq!</span>(addr, boxed.as_ptr());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.into_bitvec" class="method"><h4 class="code-header">pub fn <a href="#method.into_bitvec" class="fn">into_bitvec</a>(self) -&gt; <a class="struct" href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec">BitVec</a>&lt;T, O&gt; <a href="#" class="tooltip" data-notable-ty="BitVec&lt;T, O&gt;"></a></h4></section></summary><div class="docblock"><p>Converts the bit-box into a bit-vector.</p>
<p>This uses the Rust allocator API, and does not guarantee whether or not
a reällocation occurs internally.</p>
<p>The resulting bit-vector can be converted back into a bit-box via
<a href="struct.BitVec.html#method.into_boxed_bitslice" title="method common_base::bit_vec::prelude::BitVec::into_boxed_bitslice"><code>BitBox::into_boxed_bitslice</code></a>.</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.into_vec"><code>slice::into_vec</code></a></p>
<h6 id="api-differences-1"><a class="doc-anchor" href="#api-differences-1">§</a>API Differences</h6>
<p>The original function is implemented in an <code>impl&lt;T&gt; [T]</code> block, despite
taking a <code>Box&lt;[T]&gt;</code> receiver. Since <code>BitBox</code> cannot be used as an
explicit receiver outside its own <code>impl</code> blocks, the method is relocated
here.</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>bb = <span class="macro">bitbox!</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>bv = bb.into_bitvec();
<span class="macro">assert_eq!</span>(bv, <span class="macro">bitvec!</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>]);</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;T, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;BitSlice&lt;T, O&gt;"></a></h4></section></summary><div class="docblock"><p>Explicitly views the bit-box 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;T, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;mut BitSlice&lt;T, O&gt;"></a></h4></section></summary><div class="docblock"><p>Explicitly views the bit-box 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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a></h4></section></summary><div class="docblock"><p>Views the bit-box as a slice of its underlying memory elements.</p>
<p>Because bit-boxes uniquely own their buffer, they can safely view the
underlying buffer without dealing with contending neighbors.</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 <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a></h4></section></summary><div class="docblock"><p>Views the bit-box as a mutable slice of its underlying memory elements.</p>
<p>Because bit-boxes uniquely own their buffer, they can safely view the
underlying buffer without dealing with contending neighbors.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.fill_uninitialized" class="method"><h4 class="code-header">pub fn <a href="#method.fill_uninitialized" class="fn">fill_uninitialized</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>Sets the unused bits outside the <code>BitBox</code> buffer to a fixed value.</p>
<p>This method modifies all bits that the allocated buffer owns but which
are outside the <code>self.as_bitslice()</code> view. <code>bitvec</code> guarantees that all
owned bits are initialized to <em>some</em> value, but does not guarantee
<em>which</em> value. This method can be used to make all such unused bits have
a known value after the call, so that viewing the underlying memory
directly has consistent results.</p>
<p>Note that the crate implementation guarantees that all bits owned by its
handles are stably initialized according to the language and compiler
rules! <code>bitvec</code> will never cause UB by using uninitialized memory.</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="number">0b1011_0101u8</span>.view_bits::&lt;Msb0&gt;();
<span class="kw">let </span><span class="kw-2">mut </span>bb = BitBox::from_bitslice(<span class="kw-2">&amp;</span>bits[<span class="number">2 </span>.. <span class="number">6</span>]);
<span class="macro">assert_eq!</span>(bb.count_ones(), <span class="number">3</span>);
<span class="comment">// Remember, the two bits on each edge are unspecified, and cannot be
// observed! They must be masked away for the test to be meaningful.
</span><span class="macro">assert_eq!</span>(bb.as_raw_slice()[<span class="number">0</span>] &amp; <span class="number">0x3C</span>, <span class="number">0b00_1101_00u8</span>);
bb.fill_uninitialized(<span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(bb.as_raw_slice(), <span class="kw-2">&amp;</span>[<span class="number">0b00_1101_00u8</span>]);
bb.fill_uninitialized(<span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(bb.as_raw_slice(), <span class="kw-2">&amp;</span>[<span class="number">0b11_1101_11u8</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.force_align" class="method"><h4 class="code-header">pub fn <a href="#method.force_align" class="fn">force_align</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Ensures that the allocated buffer has no dead bits between the start of
the buffer and the start of the live bit-slice.</p>
<p>This is useful for ensuring a consistent memory layout in bit-boxes
created by cloning an arbitrary bit-slice into the heap. As bit-slices
can begin and end anywhere in memory, the <a href="struct.BitBox.html#method.from_bitslice" title="associated function common_base::bit_vec::prelude::BitBox::from_bitslice"><code>::from_bitslice()</code></a> function
does not attempt to normalize them and only does a fast element-wise
copy when creating the bit-box.</p>
<p>The value of dead bits that are in the allocation but not in the live
region are <em>initialized</em>, but do not have a <em>specified</em> value. After
calling this method, you should use <a href="struct.BitBox.html#method.fill_uninitialized" title="method common_base::bit_vec::prelude::BitBox::fill_uninitialized"><code>.fill_uninitialized()</code></a> to set the
excess bits in the buffer to a fixed value.</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="kw-2">&amp;</span><span class="number">0b10_1101_01u8</span>.view_bits::&lt;Msb0&gt;()[<span class="number">2 </span>.. <span class="number">6</span>];
<span class="kw">let </span><span class="kw-2">mut </span>bb = BitBox::from_bitslice(bits);
<span class="comment">// Remember, the two bits on each edge are unspecified, and cannot be
// observed! They must be masked away for the test to be meaningful.
</span><span class="macro">assert_eq!</span>(bb.as_raw_slice()[<span class="number">0</span>] &amp; <span class="number">0x3C</span>, <span class="number">0b00_1101_00u8</span>);
bb.force_align();
bb.fill_uninitialized(<span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(bb.as_raw_slice(), <span class="kw-2">&amp;</span>[<span class="number">0b1101_0000u8</span>]);</code></pre></div></div></details></div></details></div><details class="toggle big-toggle" open><summary><h2 id="deref-methods-BitSlice%3CT,+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;T, O&gt;&gt;</span><a href="#deref-methods-BitSlice%3CT,+O%3E" class="anchor">§</a></h2></summary><div id="deref-methods-BitSlice%3CT,+O%3E-1" class="impl-items"><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 number of bits in the bit-slice.</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.len"><code>slice::len</code></a></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="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" 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 if the bit-slice is empty (length zero).</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.is_empty"><code>slice::is_empty</code></a></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="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-7"><a class="doc-anchor" href="#original-7">§</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-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-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">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-8"><a class="doc-anchor" href="#original-8">§</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-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-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">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-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_first"><code>slice::split_first</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-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>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-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_first_mut"><code>slice::split_first_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-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>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-11"><a class="doc-anchor" href="#original-11">§</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-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-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="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-12"><a class="doc-anchor" href="#original-12">§</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-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-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">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-13"><a class="doc-anchor" href="#original-13">§</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-8"><a class="doc-anchor" href="#api-differences-8">§</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-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">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-14"><a class="doc-anchor" href="#original-14">§</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-9"><a class="doc-anchor" href="#api-differences-9">§</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-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">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-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"><code>slice::get</code></a></p>
<h6 id="api-differences-10"><a class="doc-anchor" href="#api-differences-10">§</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-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="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-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_mut"><code>slice::get_mut</code></a></p>
<h6 id="api-differences-11"><a class="doc-anchor" href="#api-differences-11">§</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-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="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-17"><a class="doc-anchor" href="#original-17">§</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-2"><a class="doc-anchor" href="#safety-2">§</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-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>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-18"><a class="doc-anchor" href="#original-18">§</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-3"><a class="doc-anchor" href="#safety-3">§</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-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><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-19"><a class="doc-anchor" href="#original-19">§</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-20"><a class="doc-anchor" href="#original-20">§</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-21"><a class="doc-anchor" href="#original-21">§</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-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h6>
<p>This panics if either <code>a</code> or <code>b</code> are out of bounds.</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><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-22"><a class="doc-anchor" href="#original-22">§</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-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="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-23"><a class="doc-anchor" href="#original-23">§</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-12"><a class="doc-anchor" href="#api-differences-12">§</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-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="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-24"><a class="doc-anchor" href="#original-24">§</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-13"><a class="doc-anchor" href="#api-differences-13">§</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-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="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-25"><a class="doc-anchor" href="#original-25">§</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-2"><a class="doc-anchor" href="#panics-2">§</a>Panics</h6>
<p>This panics if <code>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="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-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"><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-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-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">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-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_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-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-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">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-28"><a class="doc-anchor" href="#original-28">§</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-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-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">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-29"><a class="doc-anchor" href="#original-29">§</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-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-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>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-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"><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-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-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">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-31"><a class="doc-anchor" href="#original-31">§</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-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>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-32"><a class="doc-anchor" href="#original-32">§</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-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-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">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-9"><a class="doc-anchor" href="#panics-9">§</a>Panics</h6>
<p>This panics if <code>chunk_size</code> is <code>0</code>.</p>
<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>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-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_at"><code>slice::split_at</code></a></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-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">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-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_at_mut"><code>slice::split_at_mut</code></a></p>
<h6 id="api-differences-14"><a class="doc-anchor" href="#api-differences-14">§</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-11"><a class="doc-anchor" href="#panics-11">§</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-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>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-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"><code>slice::split</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-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-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">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-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_mut"><code>slice::split_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-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-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">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-37"><a class="doc-anchor" href="#original-37">§</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-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-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-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="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-38"><a class="doc-anchor" href="#original-38">§</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-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-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-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="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-39"><a class="doc-anchor" href="#original-39">§</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-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-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-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="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-40"><a class="doc-anchor" href="#original-40">§</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-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-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-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="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-41"><a class="doc-anchor" href="#original-41">§</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-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-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-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">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-42"><a class="doc-anchor" href="#original-42">§</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-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-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-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="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-43"><a class="doc-anchor" href="#original-43">§</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-23"><a class="doc-anchor" href="#api-differences-23">§</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-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="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-44"><a class="doc-anchor" href="#original-44">§</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-24"><a class="doc-anchor" href="#api-differences-24">§</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-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">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-45"><a class="doc-anchor" href="#original-45">§</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-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="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-46"><a class="doc-anchor" href="#original-46">§</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-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="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-47"><a class="doc-anchor" href="#original-47">§</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-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>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-48"><a class="doc-anchor" href="#original-48">§</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-25"><a class="doc-anchor" href="#api-differences-25">§</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-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>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-49"><a class="doc-anchor" href="#original-49">§</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-26"><a class="doc-anchor" href="#api-differences-26">§</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-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="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-50"><a class="doc-anchor" href="#original-50">§</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-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>;
<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-51"><a class="doc-anchor" href="#original-51">§</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-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>;
<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-52"><a class="doc-anchor" href="#original-52">§</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-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>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-53"><a class="doc-anchor" href="#original-53">§</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-27"><a class="doc-anchor" href="#api-differences-27">§</a>API Differences</h6>
<p>The generator function receives the index of the bit being initialized
as an argument.</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">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-54"><a class="doc-anchor" href="#original-54">§</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-12"><a class="doc-anchor" href="#panics-12">§</a>Panics</h6>
<p>This panics if either the source or destination range exceed
<code>self.len()</code>.</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>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-55"><a class="doc-anchor" href="#original-55">§</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-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-4"><a class="doc-anchor" href="#safety-4">§</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-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>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-56"><a class="doc-anchor" href="#original-56">§</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-2"><a class="doc-anchor" href="#notes-2">§</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-5"><a class="doc-anchor" href="#safety-5">§</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-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><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-57"><a class="doc-anchor" href="#original-57">§</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-13"><a class="doc-anchor" href="#panics-13">§</a>Panics</h6>
<p>This method panics if <code>self.len() * n</code> exceeds the <code>BitVec</code> capacity.</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="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-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"><code>slice::as_ptr</code></a></p>
<h6 id="api-differences-28"><a class="doc-anchor" href="#api-differences-28">§</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-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"><code>slice::as_mut_ptr</code></a></p>
<h6 id="api-differences-29"><a class="doc-anchor" href="#api-differences-29">§</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-60"><a class="doc-anchor" href="#original-60">§</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-30"><a class="doc-anchor" href="#api-differences-30">§</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 <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-61"><a class="doc-anchor" href="#original-61">§</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-31"><a class="doc-anchor" href="#api-differences-31">§</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-4"><a class="doc-anchor" href="#notes-4">§</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-62"><a class="doc-anchor" href="#original-62">§</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-32"><a class="doc-anchor" href="#api-differences-32">§</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-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-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>;</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-63"><a class="doc-anchor" href="#original-63">§</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-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-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>;</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-64"><a class="doc-anchor" href="#original-64">§</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-33"><a class="doc-anchor" href="#api-differences-33">§</a>API Differences</h6>
<p>This method is renamed, as it takes a bit-slice rather than an element
slice.</p>
<h6 id="panics-16"><a class="doc-anchor" href="#panics-16">§</a>Panics</h6>
<p>This panics if the two bit-slices have different lengths.</p>
<h6 id="examples-65"><a class="doc-anchor" href="#examples-65">§</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-17"><a class="doc-anchor" href="#panics-17">§</a>Panics</h6>
<p>This panics if <code>index</code> is out of bounds.</p>
<h6 id="examples-66"><a class="doc-anchor" href="#examples-66">§</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-6"><a class="doc-anchor" href="#safety-6">§</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-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="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-18"><a class="doc-anchor" href="#panics-18">§</a>Panics</h6>
<p>This panics if <code>index</code> is not less than <code>self.len()</code>.</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="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-7"><a class="doc-anchor" href="#safety-7">§</a>Safety</h6>
<p><code>index</code> must be less than <code>self.len()</code>.</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="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-8"><a class="doc-anchor" href="#safety-8">§</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-9"><a class="doc-anchor" href="#safety-9">§</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-10"><a class="doc-anchor" href="#safety-10">§</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-11"><a class="doc-anchor" href="#safety-11">§</a>Safety</h6>
<p><code>src.end()</code> and <code>dest + src.len()</code> must be entirely within bounds.</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="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-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="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-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="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-73"><a class="doc-anchor" href="#examples-73">§</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-74"><a class="doc-anchor" href="#examples-74">§</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-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>[].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-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>[].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-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>[].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-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>[].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-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_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-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="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-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="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-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="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-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="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-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="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-85"><a class="doc-anchor" href="#examples-85">§</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-86"><a class="doc-anchor" href="#examples-86">§</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-87"><a class="doc-anchor" href="#examples-87">§</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-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-88"><a class="doc-anchor" href="#examples-88">§</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-20"><a class="doc-anchor" href="#panics-20">§</a>Panics</h6>
<p>This panics if <code>by</code> is not less than <code>self.len()</code>.</p>
<h6 id="examples-89"><a class="doc-anchor" href="#examples-89">§</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-21"><a class="doc-anchor" href="#panics-21">§</a>Panics</h6>
<p>This panics if <code>index</code> is out of bounds.</p>
<h6 id="examples-90"><a class="doc-anchor" href="#examples-90">§</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-12"><a class="doc-anchor" href="#safety-12">§</a>Safety</h6>
<p>The caller must ensure that <code>index</code> is not out of bounds.</p>
<h6 id="examples-91"><a class="doc-anchor" href="#examples-91">§</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-65"><a class="doc-anchor" href="#original-65">§</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-92"><a class="doc-anchor" href="#examples-92">§</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%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-AsMut%3CBitSlice%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.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;T, O&gt;&gt; for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.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;T, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;mut BitSlice&lt;T, 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%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-AsRef%3CBitSlice%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.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;T, O&gt;&gt; for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.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;T, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;BitSlice&lt;T, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Binary-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html" title="trait core::fmt::Binary">Binary</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</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.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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-BitAnd%3CRhs%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<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="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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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%26BitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="impl"><a href="#impl-BitAndAssign%3C%26BitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html" title="trait core::ops::bit::BitAndAssign">BitAndAssign</a>&lt;&amp;<a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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
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.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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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%3CBitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="impl"><a href="#impl-BitAndAssign%3CBitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitAndAssign.html" title="trait core::ops::bit::BitAndAssign">BitAndAssign</a>&lt;<a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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
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.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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-BitAndAssign%3CRhs%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<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="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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-BitField-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="trait._.html" title="trait common_base::bit_vec::prelude::_">BitField</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<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></h3></section></summary><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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-BitOr%3CRhs%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<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="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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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%26BitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="impl"><a href="#impl-BitOrAssign%3C%26BitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html" title="trait core::ops::bit::BitOrAssign">BitOrAssign</a>&lt;&amp;<a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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
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.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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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%3CBitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="impl"><a href="#impl-BitOrAssign%3CBitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitOrAssign.html" title="trait core::ops::bit::BitOrAssign">BitOrAssign</a>&lt;<a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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
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.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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-BitOrAssign%3CRhs%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<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="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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-BitXor%3CRhs%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<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="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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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%26BitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="impl"><a href="#impl-BitXorAssign%3C%26BitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html" title="trait core::ops::bit::BitXorAssign">BitXorAssign</a>&lt;&amp;<a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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
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.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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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%3CBitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="impl"><a href="#impl-BitXorAssign%3CBitBox%3CT,+O%3E%3E-for-BitSlice%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.BitXorAssign.html" title="trait core::ops::bit::BitXorAssign">BitXorAssign</a>&lt;<a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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
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.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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-BitXorAssign%3CRhs%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<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="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%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Borrow%3CBitSlice%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/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;T, O&gt;&gt; for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.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;T, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;BitSlice&lt;T, 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%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-BorrowMut%3CBitSlice%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/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;T, O&gt;&gt; for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.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;T, O&gt; <a href="#" class="tooltip" data-notable-ty="&amp;mut BitSlice&lt;T, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Clone-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;</h4></section></summary><div class='docblock'>Returns a duplicate of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#245-247">Source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: &amp;Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Debug-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Default-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-DerefMut-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Display-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</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.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-Drop-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Drop-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl"><a href="#method.drop" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop" class="fn">drop</a>(&amp;mut self)</h4></section></summary><div class='docblock'>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26BitSlice%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-From%3C%26BitSlice%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;&gt; for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;) -&gt; <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%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%3CBitBox%3CT,+O%3E%3E-for-BitVec%3CT,+O%3E" class="impl"><a href="#impl-From%3CBitBox%3CT,+O%3E%3E-for-BitVec%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;&gt; 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
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl"><a href="#method.from-5" 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>(boxed: <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;) -&gt; <a class="struct" href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec">BitVec</a>&lt;T, O&gt; <a href="#" class="tooltip" data-notable-ty="BitVec&lt;T, 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-From%3CBitVec%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-From%3CBitVec%3CT,+O%3E%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec">BitVec</a>&lt;T, O&gt;&gt; for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a href="#method.from-4" 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>(bv: <a class="struct" href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec">BitVec</a>&lt;T, O&gt;) -&gt; <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CBox%3CT%3E%3E-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-From%3CBox%3CT%3E%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T&gt;&gt; for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-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>(elem: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T&gt;) -&gt; <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CCow%3C'a,+BitSlice%3CT,+O%3E%3E%3E-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-From%3CCow%3C'a,+BitSlice%3CT,+O%3E%3E%3E-for-BitBox%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/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;&gt;&gt; for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><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>(cow: <a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;&gt;) -&gt; <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3CI%3E-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-FromIterator%3CI%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O, I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a>&lt;I&gt; for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<a class="struct" href="struct.BitVec.html" title="struct common_base::bit_vec::prelude::BitVec">BitVec</a>&lt;T, O&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a>&lt;I&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a>&lt;II&gt;(iter: II) -&gt; <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
II: <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>&lt;Item = I&gt;,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Hash-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Hash-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl"><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash" class="fn">hash</a>&lt;H&gt;(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut H</a>)<div class="where">where
H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,</div></h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#235-237">Source</a></span><a href="#method.hash_slice" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice" class="fn">hash_slice</a>&lt;H&gt;(data: &amp;[Self], state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut H</a>)<div class="where">where
H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3CIdx%3E-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Index%3CIdx%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<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="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;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-IndexMut%3CIdx%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
<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="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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-IntoIterator-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3><div class="docblock"><p><a href="https://doc.rust-lang.org/nightly/alloc/vec/into_iter/struct.IntoIter.html" title="struct alloc::vec::into_iter::IntoIter">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;T, 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> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-LowerHex-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html" title="trait core::fmt::LowerHex">LowerHex</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</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.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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Not-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Not.html" title="trait core::ops::bit::Not">Not</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Octal-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html" title="trait core::fmt::Octal">Octal</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</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.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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Ord-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1021-1023">Source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1060-1062">Source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1086-1088">Source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBitBox%3CT2,+O2%3E%3E-for-%26BitSlice%3CT1,+O1%3E" class="impl"><a href="#impl-PartialEq%3CBitBox%3CT2,+O2%3E%3E-for-%26BitSlice%3CT1,+O1%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O1, O2, T1, T2&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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T2, O2&gt;&gt; for &amp;<a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T1, 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>,
T1: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,</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: &amp;<a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T2, 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-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-PartialEq%3CBitBox%3CT2,+O2%3E%3E-for-%26mut+BitSlice%3CT1,+O1%3E" class="impl"><a href="#impl-PartialEq%3CBitBox%3CT2,+O2%3E%3E-for-%26mut+BitSlice%3CT1,+O1%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O1, O2, T1, T2&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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T2, O2&gt;&gt; for &amp;mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T1, 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>,
T1: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a href="#method.eq-2" 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T2, 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-2" 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-2" 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%3CBitBox%3CT2,+O2%3E%3E-for-BitSlice%3CT1,+O1%3E" class="impl"><a href="#impl-PartialEq%3CBitBox%3CT2,+O2%3E%3E-for-BitSlice%3CT1,+O1%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O1, O2, T1, T2&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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T2, O2&gt;&gt; for <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T1, 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>,
T1: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,</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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T2, 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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-PartialEq%3CRhs%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
Rhs: <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.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;&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.eq-3" class="method trait-impl"><a href="#method.eq-3" 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-3" 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-3" 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%3CBitBox%3CT2,+O2%3E%3E-for-%26BitSlice%3CT1,+O1%3E" class="impl"><a href="#impl-PartialOrd%3CBitBox%3CT2,+O2%3E%3E-for-%26BitSlice%3CT1,+O1%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, O1, O2, T1, T2&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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T2, O2&gt;&gt; for &amp;'a <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T1, 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>,
T1: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl"><a href="#method.partial_cmp-2" 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</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;<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-2" 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-2" 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-2" 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-2" 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-2" 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-2" 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-2" 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-2" 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%3CBitBox%3CT2,+O2%3E%3E-for-%26mut+BitSlice%3CT1,+O1%3E" class="impl"><a href="#impl-PartialOrd%3CBitBox%3CT2,+O2%3E%3E-for-%26mut+BitSlice%3CT1,+O1%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, O1, O2, T1, T2&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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T2, O2&gt;&gt; for &amp;'a mut <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T1, 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>,
T1: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-3" class="method trait-impl"><a href="#method.partial_cmp-3" 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</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;<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-3" 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-3" 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-3" 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-3" 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-3" 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-3" 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-3" 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-3" 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%3CBitBox%3CT2,+O2%3E%3E-for-BitSlice%3CT1,+O1%3E" class="impl"><a href="#impl-PartialOrd%3CBitBox%3CT2,+O2%3E%3E-for-BitSlice%3CT1,+O1%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O1, O2, T1, T2&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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T2, O2&gt;&gt; for <a class="struct" href="struct.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T1, 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>,
T1: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
T2: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,</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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</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;<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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-PartialOrd%3CRhs%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,
Rhs: <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.BitSlice.html" title="struct common_base::bit_vec::prelude::BitSlice">BitSlice</a>&lt;T, O&gt;&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.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-Pointer-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Pointer-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html" title="trait core::fmt::Pointer">Pointer</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</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.fmt-6" class="method trait-impl"><a href="#method.fmt-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, fmt: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Pointer.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-TryFrom%3CBox%3C%5BT%5D%3E%3E-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-TryFrom%3CBox%3C%5BT%5D%3E%3E-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;&gt; for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(
boxed: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;, &lt;<a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt; as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[T]</a>&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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-UpperHex-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</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.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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-__Deref-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.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;T, 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.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, 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-Eq-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Eq-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section><section id="impl-Send-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Send-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section><section id="impl-Sync-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Sync-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section><section id="impl-Unpin-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Unpin-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
T: <a class="trait" href="trait.BitStore.html" title="trait common_base::bit_vec::prelude::BitStore">BitStore</a>,
O: <a class="trait" href="trait.BitOrder.html" title="trait common_base::bit_vec::prelude::BitOrder">BitOrder</a>,</div></h3></section></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-BitBox%3CT,+O%3E" class="impl"><a href="#impl-Freeze-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;</h3></section><section id="impl-RefUnwindSafe-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-RefUnwindSafe-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
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>,
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</div></h3></section><section id="impl-UnwindSafe-for-BitBox%3CT,+O%3E" class="impl"><a href="#impl-UnwindSafe-for-BitBox%3CT,+O%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, O&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.BitBox.html" title="struct common_base::bit_vec::prelude::BitBox">BitBox</a>&lt;T, O&gt;<div class="where">where
O: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</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-6" 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-6" 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-2" 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-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> = <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-1" 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-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>(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-1" 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-1" 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></div><script type="text/json" id="notable-traits-data">{"&'a mut BitSlice<T, 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>","&BitSlice<T, 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<T, 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<<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>","BitVec<T, 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>