Skip to main content

displays_as

Function displays_as 

Source
pub fn displays_as<InnerMatcher: for<'a> Matcher<&'a str>>(
    inner: InnerMatcher,
) -> DisplayMatcher<InnerMatcher>
Expand description

Matches the string representation of types that implement Display.

let result: impl Display = ...;
verify_that!(result, displays_as(eq(format!("{}", result))))?;