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§fn clone(&self) -> DiagnosticCollection
fn clone(&self) -> DiagnosticCollection
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 DiagnosticCollection
impl Debug for DiagnosticCollection
Source§impl Default for DiagnosticCollection
impl Default for DiagnosticCollection
Source§fn default() -> DiagnosticCollection
fn default() -> DiagnosticCollection
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DiagnosticCollection
impl RefUnwindSafe for DiagnosticCollection
impl Send for DiagnosticCollection
impl Sync 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