pub fn fill(&mut self, value: bool) {
		for ptr in self.as_mut_bitptr_range() {
			unsafe {
				ptr.write(value);
			}
		}
	}
/// Fills the bit-slice with a given bit.
///
/// This is a recent stabilization in the standard library. `bitvec`
/// previously offered this behavior as the novel API `.set_all()`. That
/// method name is now removed in favor of this standard-library analogue.
///
/// ## Original
///
/// [`slice::fill`](https://doc.rust-lang.org/std/primitive.slice.html#method.fill)
///
/// ## Examples
///
/// ```rust
/// use bitvec::prelude::*;
///
/// let bits = bits![mut 0; 5];
/// bits.fill(true);
/// assert_eq!(bits, bits![1; 5]);
/// ```
Fills the bit-slice with a given bit.
This is a recent stabilization in the standard library. `bitvec`
previously offered this behavior as the novel API `.set_all()`. That
method name is now removed in favor of this standard-library analogue.
Fills the bit - slice with a given bit . This is a recent stabilization in the standard library . ` bitvec ` previously offered this behavior as the novel API ` . set_all () ` . That method name is now removed in favor of this standard - library analogue .
pub fn fill(&mut self, value: bool) {
		for ptr in self.as_mut_bitptr_range() {
			unsafe {
				ptr.write(value);
			}
		}
	}
pub fn fill ( & mut self , value : bool ) { for ptr in self . as_mut_bitptr_range ( ) { unsafe { ptr . write ( value ) ; } } }
Fills the bit-slice with a given bit.
Fills the bit - slice with a given bit .
&mut self
value
bool
&mut self
value
bool
original
None
examples
```rust
use bitvec::prelude::*.


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