Trait miette::DiagnosticReportPrinter [−][src]
pub trait DiagnosticReportPrinter: Any + Send + Sync {
fn debug(
&self,
diagnostic: &dyn Diagnostic,
f: &mut Formatter<'_>
) -> Result;
fn display(
&self,
diagnostic: &dyn Diagnostic,
f: &mut Formatter<'_>
) -> Result { ... }
}
Expand description
Protocol for Diagnostic handlers, which are responsible for actually printing out Diagnostics.
Blatantly based on EyreHandler (thanks, Jane!)
Required methods
fn debug(&self, diagnostic: &dyn Diagnostic, f: &mut Formatter<'_>) -> Result
fn debug(&self, diagnostic: &dyn Diagnostic, f: &mut Formatter<'_>) -> Result
Define the report format.
Provided methods
fn display(&self, diagnostic: &dyn Diagnostic, f: &mut Formatter<'_>) -> Result
fn display(&self, diagnostic: &dyn Diagnostic, f: &mut Formatter<'_>) -> Result
Override for the Display
format.