pub struct CollectingReporter {
pub diagnostics: Vec<Diagnostic>,
}Expand description
A simple in-memory reporter useful for testing.
Fields§
§diagnostics: Vec<Diagnostic>Trait Implementations§
Source§impl Debug for CollectingReporter
impl Debug for CollectingReporter
Source§impl Default for CollectingReporter
impl Default for CollectingReporter
Source§fn default() -> CollectingReporter
fn default() -> CollectingReporter
Returns the “default value” for a type. Read more
Source§impl Reporter for CollectingReporter
impl Reporter for CollectingReporter
Source§fn report(&mut self, diagnostic: &Diagnostic, _source: &str, _filename: &str)
fn report(&mut self, diagnostic: &Diagnostic, _source: &str, _filename: &str)
Emit a single diagnostic against the provided source text.
Source§fn has_errors(&self) -> bool
fn has_errors(&self) -> bool
Returns
true if at least one error has been reported.Auto Trait Implementations§
impl Freeze for CollectingReporter
impl RefUnwindSafe for CollectingReporter
impl Send for CollectingReporter
impl Sync for CollectingReporter
impl Unpin for CollectingReporter
impl UnsafeUnpin for CollectingReporter
impl UnwindSafe for CollectingReporter
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