pub trait DiagnosticAssessor {
// Required methods
fn assess(&self, d: &Diagnostic) -> Severity;
fn explain(&self, error: &str) -> String;
fn get_diagnostic_configuration(&self) -> String;
}Expand description
the assessor determins the severity of a diagnostic this trait allows for different implementations for different usecases (e.g. default, compiler-settings, tests)
Required Methods§
Sourcefn assess(&self, d: &Diagnostic) -> Severity
fn assess(&self, d: &Diagnostic) -> Severity
determines the severity of the given diagnostic
Sourcefn explain(&self, error: &str) -> String
fn explain(&self, error: &str) -> String
Explains the given error based on the diagnostician information
Sourcefn get_diagnostic_configuration(&self) -> String
fn get_diagnostic_configuration(&self) -> String
Returns a serialized version of the diagnostics configuration this diagnostician will use to assess errors