pub struct DiagnosticCollection { /* private fields */ }Expand description
A collection of diagnostics.
Implementations§
Source§impl DiagnosticCollection
impl DiagnosticCollection
Sourcepub fn add(&mut self, d: Diagnostic)
pub fn add(&mut self, d: Diagnostic)
Add a diagnostic.
Sourcepub fn add_error(&mut self, err: &KernelError)
pub fn add_error(&mut self, err: &KernelError)
Add from a kernel error.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Return true if there are error-level diagnostics.
Sourcepub fn iter(&self) -> impl Iterator<Item = &Diagnostic>
pub fn iter(&self) -> impl Iterator<Item = &Diagnostic>
Iterate.
Sourcepub fn by_severity(&self, severity: Severity) -> Vec<&Diagnostic>
pub fn by_severity(&self, severity: Severity) -> Vec<&Diagnostic>
Filter by severity.
Sourcepub fn errors(&self) -> Vec<&Diagnostic>
pub fn errors(&self) -> Vec<&Diagnostic>
Error-level diagnostics.
Sourcepub fn warnings(&self) -> Vec<&Diagnostic>
pub fn warnings(&self) -> Vec<&Diagnostic>
Warning-level diagnostics.
Trait Implementations§
Source§impl Clone for DiagnosticCollection
impl Clone for DiagnosticCollection
Source§impl Debug for DiagnosticCollection
impl Debug for DiagnosticCollection
Source§impl Default for DiagnosticCollection
impl Default for DiagnosticCollection
Auto Trait Implementations§
impl !Send for DiagnosticCollection
impl !Sync for DiagnosticCollection
impl Forget for DiagnosticCollection
impl Freeze for DiagnosticCollection
impl Move for DiagnosticCollection
impl RefUnwindSafe for DiagnosticCollection
impl Unpin for DiagnosticCollection
impl UnsafeUnpin for DiagnosticCollection
impl UnwindSafe for DiagnosticCollection
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