fn bitand(self, rhs: Pattern) -> Self::Output {
        let cb1 = self.0;
        let cb2 = rhs.0;
        Pattern(Box::new(move |value| cb1(value) && cb2(value)))
    }
/// Combines two patterns into a pattern which matches a string iff both patterns match that string.
///
/// # Example
/// ```
/// use sanitize_html::rules::pattern::Pattern;
/// use regex::Regex;
///
/// let pan = Pattern::regex(Regex::new("pan").unwrap());
/// let ant = Pattern::regex(Regex::new("ant").unwrap());
/// let pattern = pan & ant;
///
/// assert!(!pattern.matches("pan"));
/// assert!(!pattern.matches("ant"));
/// assert!(pattern.matches("pants"));
/// ```
Combines two patterns into a pattern which matches a string iff both patterns match that string.
Combines two patterns into a pattern which matches a string iff both patterns match that string .
fn bitand(self, rhs: Pattern) -> Self::Output {
        let cb1 = self.0;
        let cb2 = rhs.0;
        Pattern(Box::new(move |value| cb1(value) && cb2(value)))
    }
fn bitand ( self , rhs : Pattern ) -> Self :: Output { let cb1 = self . 0 ; let cb2 = rhs . 0 ; Pattern ( Box :: new ( move | value | cb1 ( value ) && cb2 ( value ) ) ) }
Combines two patterns into a pattern which matches a string iff both patterns match that string.
Combines two patterns into a pattern which matches a string iff both patterns match that string .
self
rhs
Pattern
self
rhs
Pattern
example
```
use sanitize_html::rules::pattern::Pattern;
use regex::Regex.

let pan = Pattern::regex(Regex::new("pan").unwrap());
let ant = Pattern::regex(Regex::new("ant").unwrap());
let pattern = pan & ant.

assert!(!pattern.matches("pan"));
assert!(!pattern.matches("ant"));
assert!(pattern.matches("pants"));
```
` ` ` use sanitize_html :: rules :: pattern :: Pattern ; use regex :: Regex . let pan = Pattern :: regex ( Regex :: new ( " pan " ) . unwrap () ) ; let ant = Pattern :: regex ( Regex :: new ( " ant " ) . unwrap () ) ; let pattern = pan & ant . assert! ( !pattern . matches ( " pan " )) ; assert! ( !pattern . matches ( " ant " )) ; assert! ( pattern . matches ( " pants " )) ; ` ` `