Skip to main content

DiagnosticAssessor

Trait DiagnosticAssessor 

Source
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§

Source

fn assess(&self, d: &Diagnostic) -> Severity

determines the severity of the given diagnostic

Source

fn explain(&self, error: &str) -> String

Explains the given error based on the diagnostician information

Source

fn get_diagnostic_configuration(&self) -> String

Returns a serialized version of the diagnostics configuration this diagnostician will use to assess errors

Implementors§