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.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Handler
impl Send for Handler
impl !Sync for Handler
impl Unpin for Handler
impl UnwindSafe for Handler
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more