Struct sway_error::handler::Handler
source · pub struct Handler { /* private fields */ }
Expand description
A handler with which you can emit diagnostics.
Implementations§
source§impl Handler
impl Handler
sourcepub fn emit_err(&self, err: CompileError) -> ErrorEmitted
pub fn emit_err(&self, err: CompileError) -> ErrorEmitted
Emit the error err
.
sourcepub fn emit_warn(&self, warn: CompileWarning)
pub fn emit_warn(&self, warn: CompileWarning)
Emit the warning warn
.
sourcepub fn consume(self) -> (Vec<CompileError>, Vec<CompileWarning>)
pub fn consume(self) -> (Vec<CompileError>, Vec<CompileWarning>)
Extract all the errors from this handler.