Skip to main content

DiagnosticReporter

Trait DiagnosticReporter 

Source
pub trait DiagnosticReporter {
    // Required methods
    fn report(&mut self, diagnostics: &[ResolvedDiagnostics]);
    fn register(&mut self, path: String, src: String) -> usize;

    // Provided method
    fn buffer(&self) -> Option<String> { ... }
}
Expand description

the DiagnosticReporter decides on the format and where to report the diagnostic to. possible implementations could print to either std-out, std-err or a file, etc.

Required Methods§

Source

fn report(&mut self, diagnostics: &[ResolvedDiagnostics])

reports the given diagnostic

Source

fn register(&mut self, path: String, src: String) -> usize

register the given path & src and returns an ID to indicate a relationship the given src (diagnostics for this src need to use this id)

Provided Methods§

Source

fn buffer(&self) -> Option<String>

Implementors§