pub fn splice<R, I>(
		&mut self,
		range: R,
		replace_with: I,
	) -> Splice<T, O, I::IntoIter>
	where
		R: RangeBounds<usize>,
		I: IntoIterator<Item = bool>,
	{
		Splice::new(self.drain(range), replace_with)
	}
/// Modifies [`self.drain()`] so that the removed bit-slice is instead
/// replaced with the contents of another bit-stream.
///
/// As with `.drain()`, the specified range is always removed from the
/// bit-vector even if the splicer is not fully consumed, and the splicer
/// does not specify how many bits are removed if it leaks.
///
/// The replacement source is only consumed when the splicer drops; however,
/// it may be pulled before then. The replacement source cannot assume that
/// there will be a delay between creation of the splicer and when it must
/// begin producing bits.
///
/// This copies the `Vec::splice` implementation; see its documentation for
/// more details about how the replacement should act.
///
/// ## Original
///
/// [`Vec::splice`](alloc::vec::Vec::splice)
///
/// ## Panics
///
/// This panics if `range` departs `0 .. self.len()`.
///
/// ## Examples
///
/// ```rust
/// use bitvec::prelude::*;
///
/// let mut bv = bitvec![0, 1, 1];
/// //                   a  b  c
/// let mut yank = bv.splice(
///   .. 2,
///   bits![static 1, 1, 0].iter().by_vals(),
/// //             d  e  f
/// );
///
/// assert!(!yank.next().unwrap()); // a
/// assert!(yank.next().unwrap()); // b
/// drop(yank);
/// assert_eq!(bv, bits![1, 1, 0, 1]);
/// //                   d  e  f  c
/// ```
///
/// [`self.drain()`]: Self::drain
Modifies [`self.drain()`] so that the removed bit-slice is instead
replaced with the contents of another bit-stream.

As with `.drain()`, the specified range is always removed from the
bit-vector even if the splicer is not fully consumed, and the splicer
does not specify how many bits are removed if it leaks.

The replacement source is only consumed when the splicer drops; however,
it may be pulled before then. The replacement source cannot assume that
there will be a delay between creation of the splicer and when it must
begin producing bits.

This copies the `Vec::splice` implementation; see its documentation for
more details about how the replacement should act.
Modifies [ ` self . drain () ` ] so that the removed bit - slice is instead replaced with the contents of another bit - stream . As with ` . drain () ` the specified range is always removed from the bit - vector even if the splicer is not fully consumed and the splicer does not specify how many bits are removed if it leaks . The replacement source is only consumed when the splicer drops ; however it may be pulled before then . The replacement source cannot assume that there will be a delay between creation of the splicer and when it must begin producing bits . This copies the ` Vec :: splice ` implementation ; see its documentation for more details about how the replacement should act .
pub fn splice<R, I>(
		&mut self,
		range: R,
		replace_with: I,
	) -> Splice<T, O, I::IntoIter>
	where
		R: RangeBounds<usize>,
		I: IntoIterator<Item = bool>,
	{
		Splice::new(self.drain(range), replace_with)
	}
pub fn splice < R , I > ( & mut self , range : R , replace_with : I , ) -> Splice < T , O , I :: IntoIter > where R : RangeBounds < usize > , I : IntoIterator < Item = bool > , { Splice :: new ( self . drain ( range ) , replace_with ) }
Modifies [`self.drain()`] so that the removed bit-slice is instead
replaced with the contents of another bit-stream.
Modifies [ ` self . drain () ` ] so that the removed bit - slice is instead replaced with the contents of another bit - stream .
&mut self
range
R
replace_with
I
&mut self
range
R
replace_with
I
original
None
panics
This panics if `range` departs `0 ..
This panics if ` range ` departs ` 0 ..
examples
```rust
use bitvec::prelude::*.






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