swc_common::errors::emitter

Trait Emitter

source
pub trait Emitter: Send {
    // Required method
    fn emit(&mut self, db: &DiagnosticBuilder<'_>);

    // Provided method
    fn should_show_explain(&self) -> bool { ... }
}
Expand description

Emitter trait for emitting errors.

Required Methods§

source

fn emit(&mut self, db: &DiagnosticBuilder<'_>)

Emit a structured diagnostic.

Provided Methods§

source

fn should_show_explain(&self) -> bool

Check if should show explanations about “rustc –explain”

Implementors§