983 B
983 B
Shared Bit-Slice Iteration
This view iterates each bit in the bit-slice by proxy reference. It is
created by the BitSlice::iter method.
Original
API Differences
While this iterator can manifest &bool references, it instead yields the
bitvec proxy reference for consistency with the IterMut type. It can
be converted to yield true references with .by_refs(). Additionally, because
it does not yield &bool, the Iterator::copied method does not apply. It
can be converted to an iterator of bool values with .by_vals().
Examples
use bitvec::prelude::*;
let bits = bits![0, 1];
for bit in bits.iter() {
# #[cfg(feature = "std")] {
println!("{}", bit);
# }
}