pub fn mismatches(&self) -> Vec<MatchResult> {
        let matches = self.matches();
        let mismatches = matches.iter()
            .filter(|m| !m.matched())
            .map(|m| m.clone());
        let interactions: Vec<&Interaction> = matches.iter().map(|m| {
            match *m {
                MatchResult::RequestMatch(ref interaction) => Some(interaction),
                MatchResult::RequestMismatch(ref interaction, _) => Some(interaction),
                MatchResult::RequestNotFound(_) => None,
                MatchResult::MissingRequest(_) => None
            }
        }).filter(|o| o.is_some()).map(|o| o.unwrap()).collect();
        let missing = self.pact.interactions.iter()
            .filter(|i| !interactions.contains(i))
            .map(|i| MatchResult::MissingRequest(i.clone()));
        mismatches.chain(missing).collect()
    }
/// Returns all the mismatches that have occurred with this mock server
Returns all the mismatches that have occurred with this mock server
Returns all the mismatches that have occurred with this mock server
pub fn mismatches(&self) -> Vec<MatchResult> {
        let matches = self.matches();
        let mismatches = matches.iter()
            .filter(|m| !m.matched())
            .map(|m| m.clone());
        let interactions: Vec<&Interaction> = matches.iter().map(|m| {
            match *m {
                MatchResult::RequestMatch(ref interaction) => Some(interaction),
                MatchResult::RequestMismatch(ref interaction, _) => Some(interaction),
                MatchResult::RequestNotFound(_) => None,
                MatchResult::MissingRequest(_) => None
            }
        }).filter(|o| o.is_some()).map(|o| o.unwrap()).collect();
        let missing = self.pact.interactions.iter()
            .filter(|i| !interactions.contains(i))
            .map(|i| MatchResult::MissingRequest(i.clone()));
        mismatches.chain(missing).collect()
    }
pub fn mismatches ( & self ) -> Vec < MatchResult > { let matches = self . matches ( ) ; let mismatches = matches . iter ( ) . filter ( | m | ! m . matched ( ) ) . map ( | m | m . clone ( ) ) ; let interactions : Vec < & Interaction > = matches . iter ( ) . map ( | m | { match * m { MatchResult :: RequestMatch ( ref interaction ) => Some ( interaction ) , MatchResult :: RequestMismatch ( ref interaction , _ ) => Some ( interaction ) , MatchResult :: RequestNotFound ( _ ) => None , MatchResult :: MissingRequest ( _ ) => None } } ) . filter ( | o | o . is_some ( ) ) . map ( | o | o . unwrap ( ) ) . collect ( ) ; let missing = self . pact . interactions . iter ( ) . filter ( | i | ! interactions . contains ( i ) ) . map ( | i | MatchResult :: MissingRequest ( i . clone ( ) ) ) ; mismatches . chain ( missing ) . collect ( ) }
Returns all the mismatches that have occurred with this mock server
Returns all the mismatches that have occurred with this mock server
&self
&self