pub struct DiagnosticReport { /* private fields */ }Expand description
An insertion-order collection of diagnostics.
Implementations§
Source§impl DiagnosticReport
impl DiagnosticReport
Sourcepub fn add(&mut self, diagnostic: Diagnostic)
pub fn add(&mut self, diagnostic: Diagnostic)
Adds a diagnostic to the end of the report.
Sourcepub fn diagnostics(&self) -> &[Diagnostic]
pub fn diagnostics(&self) -> &[Diagnostic]
Returns the diagnostics as a slice in insertion order.
Sourcepub fn iter(&self) -> Iter<'_, Diagnostic>
pub fn iter(&self) -> Iter<'_, Diagnostic>
Iterates diagnostics in insertion order.
Sourcepub fn count_by_level(&self, level: DiagnosticLevel) -> usize
pub fn count_by_level(&self, level: DiagnosticLevel) -> usize
Counts diagnostics with the exact provided level.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Returns true when the report contains an error or fatal diagnostic.
Sourcepub fn highest_severity(&self) -> Option<DiagnosticLevel>
pub fn highest_severity(&self) -> Option<DiagnosticLevel>
Returns the highest diagnostic severity in the report.
Sourcepub fn extend_report(&mut self, other: Self)
pub fn extend_report(&mut self, other: Self)
Extends this report with diagnostics from another report, preserving insertion order.
Trait Implementations§
Source§impl Clone for DiagnosticReport
impl Clone for DiagnosticReport
Source§fn clone(&self) -> DiagnosticReport
fn clone(&self) -> DiagnosticReport
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiagnosticReport
impl Debug for DiagnosticReport
Source§impl Default for DiagnosticReport
impl Default for DiagnosticReport
Source§fn default() -> DiagnosticReport
fn default() -> DiagnosticReport
Returns the “default value” for a type. Read more
Source§impl FromIterator<Diagnostic> for DiagnosticReport
impl FromIterator<Diagnostic> for DiagnosticReport
Source§fn from_iter<T: IntoIterator<Item = Diagnostic>>(diagnostics: T) -> Self
fn from_iter<T: IntoIterator<Item = Diagnostic>>(diagnostics: T) -> Self
Creates a value from an iterator. Read more
Source§impl<'a> IntoIterator for &'a DiagnosticReport
impl<'a> IntoIterator for &'a DiagnosticReport
Source§impl PartialEq for DiagnosticReport
impl PartialEq for DiagnosticReport
impl Eq for DiagnosticReport
impl StructuralPartialEq for DiagnosticReport
Auto Trait Implementations§
impl Freeze for DiagnosticReport
impl RefUnwindSafe for DiagnosticReport
impl Send for DiagnosticReport
impl Sync for DiagnosticReport
impl Unpin for DiagnosticReport
impl UnsafeUnpin for DiagnosticReport
impl UnwindSafe for DiagnosticReport
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