pub fn count_zeros(&self) -> usize {
		match self.domain() {
			Domain::Enclave(elem) => (elem.load_value()
				| !elem.mask().into_inner())
			.count_zeros() as usize,
			Domain::Region { head, body, tail } => {
				head.map_or(0, |elem| {
					(elem.load_value() | !elem.mask().into_inner()).count_zeros()
						as usize
				}) + body
					.iter()
					.map(BitStore::load_value)
					.map(|elem| elem.count_zeros() as usize)
					.sum::<usize>() + tail.map_or(0, |elem| {
					(elem.load_value() | !elem.mask().into_inner()).count_zeros()
						as usize
				})
			},
		}
	}
/// Counts the number of bits cleared to `0` in the bit-slice contents.
///
/// ## Examples
///
/// ```rust
/// use bitvec::prelude::*;
///
/// let bits = bits![1, 1, 0, 0];
/// assert_eq!(bits[.. 2].count_zeros(), 0);
/// assert_eq!(bits[2 ..].count_zeros(), 2);
/// assert_eq!(bits![].count_zeros(), 0);
/// ```
Counts the number of bits cleared to `0` in the bit-slice contents.
Counts the number of bits cleared to ` 0 ` in the bit - slice contents .
pub fn count_zeros(&self) -> usize {
		match self.domain() {
			Domain::Enclave(elem) => (elem.load_value()
				| !elem.mask().into_inner())
			.count_zeros() as usize,
			Domain::Region { head, body, tail } => {
				head.map_or(0, |elem| {
					(elem.load_value() | !elem.mask().into_inner()).count_zeros()
						as usize
				}) + body
					.iter()
					.map(BitStore::load_value)
					.map(|elem| elem.count_zeros() as usize)
					.sum::<usize>() + tail.map_or(0, |elem| {
					(elem.load_value() | !elem.mask().into_inner()).count_zeros()
						as usize
				})
			},
		}
	}
pub fn count_zeros ( & self ) -> usize { match self . domain ( ) { Domain :: Enclave ( elem ) => ( elem . load_value ( ) | ! elem . mask ( ) . into_inner ( ) ) . count_zeros ( ) as usize , Domain :: Region { head , body , tail } => { head . map_or ( 0 , | elem | { ( elem . load_value ( ) | ! elem . mask ( ) . into_inner ( ) ) . count_zeros ( ) as usize } ) + body . iter ( ) . map ( BitStore :: load_value ) . map ( | elem | elem . count_zeros ( ) as usize ) . sum :: < usize > ( ) + tail . map_or ( 0 , | elem | { ( elem . load_value ( ) | ! elem . mask ( ) . into_inner ( ) ) . count_zeros ( ) as usize } ) } , } }
Counts the number of bits cleared to `0` in the bit-slice contents.
Counts the number of bits cleared to ` 0 ` in the bit - slice contents .
&self
&self
examples
```rust
use bitvec::prelude::*.


` ` ` rust use bitvec :: prelude :: * .