swc_core::ecma::utils::swc_common::errors

Trait Emitter

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

    // Provided method
    fn should_show_explain(&self) -> bool { ... }
}
Available on crate features __ecma and __utils only.
Expand description

Emitter trait for emitting errors.

Required Methods§

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

Emit a structured diagnostic.

Provided Methods§

fn should_show_explain(&self) -> bool

Check if should show explanations about “rustc –explain”

Implementations on Foreign Types§

§

impl Emitter for PrettyEmitter

§

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

Implementors§