pub fn contains<T2, O2>(&self, other: &BitSlice<T2, O2>) -> bool
	where
		T2: BitStore,
		O2: BitOrder,
	{
		self.len() >= other.len()
			&& self.windows(other.len()).any(|window| window == other)
	}
/// Tests if the bit-slice contains the given sequence anywhere within it.
///
/// This scans over `self.windows(other.len())` 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.
///
/// ## Original
///
/// [`slice::contains`](https://doc.rust-lang.org/std/primitive.slice.html#method.contains)
///
/// ## Examples
///
/// ```rust
/// use bitvec::prelude::*;
///
/// let bits = bits![0, 0, 1, 0, 1, 1, 0, 0];
/// assert!( bits.contains(bits![0, 1, 1, 0]));
/// assert!(!bits.contains(bits![1, 0, 0, 1]));
/// ```
Tests if the bit-slice contains the given sequence anywhere within it.
This scans over `self.windows(other.len())` 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.
Tests if the bit - slice contains the given sequence anywhere within it . This scans over ` self . windows ( other . len () ) ` 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 .
pub fn contains<T2, O2>(&self, other: &BitSlice<T2, O2>) -> bool
	where
		T2: BitStore,
		O2: BitOrder,
	{
		self.len() >= other.len()
			&& self.windows(other.len()).any(|window| window == other)
	}
pub fn contains < T2 , O2 > ( & self , other : & BitSlice < T2 , O2 > ) -> bool where T2 : BitStore , O2 : BitOrder , { self . len ( ) >= other . len ( ) && self . windows ( other . len ( ) ) . any ( | window | window == other ) }
Tests if the bit-slice contains the given sequence anywhere within it.
Tests if the bit - slice contains the given sequence anywhere within it .
&self
other
&BitSlice<T2, O2>
&self
other
&BitSlice<T2, O2>
original
None
examples
```rust
use bitvec::prelude::*.


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