Struct syntax::diagnostic::Handler [−] [src]

pub struct Handler {
    pub can_emit_warnings: bool,
    // some fields omitted
}
Unstable

A handler deals with errors; certain errors (fatal, bug, unimpl) may cause immediate exit, others log errors for later reporting.

Fields

can_emit_warnings
Unstable

Methods

impl Handler

fn new(color_config: ColorConfig, registry: Option<Registry>, can_emit_warnings: bool) -> Handler

Unstable

fn with_emitter(can_emit_warnings: bool, e: Box<Emitter + Send>) -> Handler

Unstable

fn fatal(&self, msg: &str) -> !

Unstable

fn err(&self, msg: &str)

Unstable

fn bump_err_count(&self)

Unstable

fn err_count(&self) -> usize

Unstable

fn has_errors(&self) -> bool

Unstable

fn abort_if_errors(&self)

Unstable

fn warn(&self, msg: &str)

Unstable

fn note(&self, msg: &str)

Unstable

fn help(&self, msg: &str)

Unstable

fn bug(&self, msg: &str) -> !

Unstable

fn unimpl(&self, msg: &str) -> !

Unstable

fn emit(&self, cmsp: Option<(&CodeMap, Span)>, msg: &str, lvl: Level)

Unstable

fn emit_with_code(&self, cmsp: Option<(&CodeMap, Span)>, msg: &str, code: &str, lvl: Level)

Unstable

fn custom_emit(&self, cm: &CodeMap, sp: RenderSpan, msg: &str, lvl: Level)

Unstable