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§
Sourcefn emit_diagnostic(&mut self, diagnostic: &Diagnostic)
fn emit_diagnostic(&mut self, diagnostic: &Diagnostic)
Emits a diagnostic.
Provided Methods§
Sourcefn source_map(&self) -> Option<&Arc<SourceMap>>
fn source_map(&self) -> Option<&Arc<SourceMap>>
Returns a reference to the source map, if any.
Sourcefn supports_color(&self) -> bool
fn supports_color(&self) -> bool
Returns true
if we can use colors in the current output stream.
Implementors§
impl Emitter for HumanBufferEmitter
impl Emitter for HumanEmitter
impl Emitter for JsonEmitter
Available on crate feature
json
only.