pub fn ansi_description(&self) -> String {
        match *self {
            Mismatch::MethodMismatch { expected: ref e, actual: ref a } => format!("expected {} but was {}", Red.paint(e.clone()), Green.paint(a.clone())),
            Mismatch::PathMismatch { expected: ref e, actual: ref a, .. } => format!("expected '{}' but was '{}'", Red.paint(e.clone()), Green.paint(a.clone())),
            Mismatch::StatusMismatch { expected: ref e, actual: ref a } => format!("expected {} but was {}", Red.paint(e.to_string()), Green.paint(a.to_string())),
            Mismatch::QueryMismatch { expected: ref e, actual: ref a, parameter: ref p, .. } => format!("Expected '{}' but received '{}' for query parameter '{}'",
                Red.paint(e.to_string()), Green.paint(a.to_string()), Style::new().bold().paint(p.clone())),
            Mismatch::HeaderMismatch { expected: ref e, actual: ref a, key: ref k, .. } => format!("Expected header '{}' to have value '{}' but was '{}'",
                Style::new().bold().paint(k.clone()), Red.paint(e.to_string()), Green.paint(a.to_string())),
            Mismatch::BodyTypeMismatch {  expected: ref e, actual: ref a } => format!("expected '{}' body but was '{}'", Red.paint(e.clone()), Green.paint(a.clone())),
            Mismatch::BodyMismatch { ref path, ref mismatch, .. } => format!("{} -> {}", Style::new().bold().paint(path.clone()), mismatch)
        }
    }
/// Returns a formatted string with ansi escape codes for this mismatch
Returns a formatted string with ansi escape codes for this mismatch
Returns a formatted string with ansi escape codes for this mismatch
pub fn ansi_description(&self) -> String {
        match *self {
            Mismatch::MethodMismatch { expected: ref e, actual: ref a } => format!("expected {} but was {}", Red.paint(e.clone()), Green.paint(a.clone())),
            Mismatch::PathMismatch { expected: ref e, actual: ref a, .. } => format!("expected '{}' but was '{}'", Red.paint(e.clone()), Green.paint(a.clone())),
            Mismatch::StatusMismatch { expected: ref e, actual: ref a } => format!("expected {} but was {}", Red.paint(e.to_string()), Green.paint(a.to_string())),
            Mismatch::QueryMismatch { expected: ref e, actual: ref a, parameter: ref p, .. } => format!("Expected '{}' but received '{}' for query parameter '{}'",
                Red.paint(e.to_string()), Green.paint(a.to_string()), Style::new().bold().paint(p.clone())),
            Mismatch::HeaderMismatch { expected: ref e, actual: ref a, key: ref k, .. } => format!("Expected header '{}' to have value '{}' but was '{}'",
                Style::new().bold().paint(k.clone()), Red.paint(e.to_string()), Green.paint(a.to_string())),
            Mismatch::BodyTypeMismatch {  expected: ref e, actual: ref a } => format!("expected '{}' body but was '{}'", Red.paint(e.clone()), Green.paint(a.clone())),
            Mismatch::BodyMismatch { ref path, ref mismatch, .. } => format!("{} -> {}", Style::new().bold().paint(path.clone()), mismatch)
        }
    }
pub fn ansi_description ( & self ) -> String { match * self { Mismatch :: MethodMismatch { expected : ref e , actual : ref a } => format ! ( " " Red paint ( e clone ( ) ) Green paint ( a clone ( ) ) ) , Mismatch :: PathMismatch { expected : ref e , actual : ref a , .. } => format ! ( " " Red paint ( e clone ( ) ) Green paint ( a clone ( ) ) ) , Mismatch :: StatusMismatch { expected : ref e , actual : ref a } => format ! ( " " Red paint ( e to_string ( ) ) Green paint ( a to_string ( ) ) ) , Mismatch :: QueryMismatch { expected : ref e , actual : ref a , parameter : ref p , .. } => format ! ( " " Red paint ( e to_string ( ) ) Green paint ( a to_string ( ) ) Style new ( ) bold ( ) paint ( p clone ( ) ) ) , Mismatch :: HeaderMismatch { expected : ref e , actual : ref a , key : ref k , .. } => format ! ( " " Style new ( ) bold ( ) paint ( k clone ( ) ) Red paint ( e to_string ( ) ) Green paint ( a to_string ( ) ) ) , Mismatch :: BodyTypeMismatch { expected : ref e , actual : ref a } => format ! ( " " Red paint ( e clone ( ) ) Green paint ( a clone ( ) ) ) , Mismatch :: BodyMismatch { ref path , ref mismatch , .. } => format ! ( " " Style new ( ) bold ( ) paint ( path clone ( ) ) mismatch ) } }
Returns a formatted string with ansi escape codes for this mismatch
Returns a formatted string with ansi escape codes for this mismatch
&self
&self