solar_interface::diagnostics

Trait Emitter

Source
pub trait Emitter: Any {
    // Required method
    fn emit_diagnostic(&mut self, diagnostic: &Diagnostic);

    // Provided methods
    fn source_map(&self) -> Option<&Arc<SourceMap>> { ... }
    fn supports_color(&self) -> bool { ... }
}
Expand description

Diagnostic emitter.

Required Methods§

Source

fn emit_diagnostic(&mut self, diagnostic: &Diagnostic)

Emits a diagnostic.

Provided Methods§

Source

fn source_map(&self) -> Option<&Arc<SourceMap>>

Returns a reference to the source map, if any.

Source

fn supports_color(&self) -> bool

Returns true if we can use colors in the current output stream.

Implementors§