Diagnostic

Trait Diagnostic 

Source
pub trait Diagnostic {
    // Required methods
    fn kind(&self) -> DiagnosticKind;
    fn schema_name(&self) -> &str;
    fn render(&self, renderer: &Renderer, parser: &Parser) -> String;
}
Expand description

Diagnostic information about an error or a warning.

Required Methods§

Source

fn kind(&self) -> DiagnosticKind

Kind of the diagnostic; either an error or a warning.

Source

fn schema_name(&self) -> &str

Name of the schema this diagnostic originated from.

The schema name can be used to look up the Schema with Parser::get_schema.

Source

fn render(&self, renderer: &Renderer, parser: &Parser) -> String

Renders the diagnostic for printing.

Implementors§