mirror of https://github.com/zkat/miette.git
This PR overhauls the toplevel/main experience for `miette`. It adds a new `Report` type based on `eyre::Report` and overhauls various types to fit into this model, as well as prepare for some [future changes in Rust](https://github.com/nrc/rfcs/pull/1) that will make it possible to integrate `miette` directly with crates like `eyre` instead of having to use this specific `Report`. As such, this PR is a major breaking change, especially for anyone using `DiagnosticReport` and company. BREAKING CHANGES: * `DiagnosticReport` is now just `Report`, and is a different, `eyre::Report`-like type. * `DiagnosticResult` is now just `Result`. * `.into_diagnostic()` now just transforms the error into a `Report`. * `DiagnosticReportPrinter` has been replaced with `ReportHandler` * `set_printer` has been replaced by `set_hook` * `code` is now optional. * `.into_diagnostic()` no longer takes a `code` argument. * `#[diagnostic]` is now optional when deriving `Diagnostic`. |
||
|---|---|---|
| .. | ||
| mod.rs | ||