pub trait AssertDebugString<'a, R> {
// Required method
fn debug_string(self) -> Spec<'a, String, R>;
}Expand description
Mapping the subject into its debug string representation to do assertions on its debug string.
§Examples
use asserting::prelude::*;
#[derive(Debug)]
struct Foo {
hello: String,
}
let subject = Foo { hello: "World".into() };
assert_that!(&subject).debug_string().contains("World");
assert_that!(&subject).debug_string().does_not_start_with("Bar");Required Methods§
Sourcefn debug_string(self) -> Spec<'a, String, R>
fn debug_string(self) -> Spec<'a, String, R>
Maps the subject into its debug string representation to do assertions on its debug string.
§Examples
use asserting::prelude::*;
#[derive(Debug)]
struct Foo {
hello: String,
}
let subject = Foo { hello: "World".into() };
assert_that!(&subject).debug_string().contains("World");
assert_that!(&subject).debug_string().does_not_start_with("Bar");