pub struct ErrorManager { /* private fields */ }Expand description
Registers errors
Implementations§
Source§impl ErrorManager
impl ErrorManager
pub fn new() -> Self
pub fn emit_error(&mut self, err: impl Error + 'static)
pub fn emit_warning(&mut self, err: impl Error + 'static)
pub fn n_errors(&self) -> usize
pub fn has_errors(&self) -> bool
pub fn errors(&self) -> &[Box<dyn Error>]
Sourcepub fn errors_iterator_cast<E: Error>(&self) -> impl Iterator<Item = &E>
pub fn errors_iterator_cast<E: Error>(&self) -> impl Iterator<Item = &E>
Gets an iterator over the errors inside self, casting them to the
concrete error type specified
This is super unsafe, and should only be used on tests
§Panics
If if fails to downcast an error into E
pub fn print_errors(&self, src: &SourceMap, out: &mut dyn Write) -> Result
pub fn n_warnings(&self) -> usize
pub fn clear_warnings(&mut self)
pub fn print_warnings(&self, src: &SourceMap, out: &mut dyn Write) -> Result
pub fn merge(&mut self, other: &mut ErrorManager)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorManager
impl !RefUnwindSafe for ErrorManager
impl !Send for ErrorManager
impl !Sync for ErrorManager
impl Unpin for ErrorManager
impl !UnwindSafe for ErrorManager
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