Adds a ReportFormatter trait and a Reporter::report_with_formatter method allowing customization of formatting the report without reimplementing reporter internals. Currently, we use format_external and format_terms but we can refine formatting in the future as needed e.g. all the explain methods in the reporter.
Adds a DefaultStringReportFormatter which implements the existing format for the DefaultStringReporter.
Adds a
ReportFormatter
trait and aReporter::report_with_formatter
method allowing customization of formatting the report without reimplementing reporter internals. Currently, we useformat_external
andformat_terms
but we can refine formatting in the future as needed e.g. all theexplain
methods in the reporter.Adds a
DefaultStringReportFormatter
which implements the existing format for theDefaultStringReporter
.You can see how much easier this is to use in the example diff at https://github.com/pubgrub-rs/pubgrub/commit/725ec87c7ef7b1a7efbe90f91375b8d685318aa2
Some existing discussion at https://github.com/zanieb/pubgrub/pull/10
Addresses some of the concerns in https://github.com/pubgrub-rs/pubgrub/issues/150