Expand description
The formatters provided by this crate.
The formatters in this module can be used to implement custom matchers without having to manually implement their formatting logic. You can use these formatters to get pretty formatting for free.
If you’re just writing tests and not writing custom matchers or formatters, you don’t need anything in this module.
The Format::Value of a formatter tells you what failure output it accepts. For example,
MismatchFormat can format any matcher that returns a Mismatch.
See Writing Custom Matchers to learn how to implement your own matchers that use these provided formatters.
See Writing Custom Formatters to learn how to implement your own formatters like the ones in this module.
Modules§
- diff
diff - Types for styling formatted diffs.
Structs§
- ByField
Format - A formatter for
FailuresByFieldvalues. - Diff
Format diff - A formatter for
Diffvalues. - Expectation
Format - A formatter for
Expectationvalues. - Failure
Format - A formatter for
FormattedFailurevalues. - Header
Format - A formatter that adds a header to the output of another formatter.
- Infallible
Format - A formatter for matchers that never fail.
- Message
Format - A formatter which prints a static string message.
- Mismatch
Format - A formatter for
Mismatchvalues. - Some
Failures Format - A formatter for
SomeFailuresvalues. - WhyFormat
- A formatter that prints a context string provided by
whyorwhy_lazy.