pub struct Diagnostics {
pub problems: Vec<Diagnostic>,
pub context: String,
}Expand description
A collection of diagnostics
Fields§
§problems: Vec<Diagnostic>The problems.
context: StringThe context.
Implementations§
Source§impl Diagnostics
impl Diagnostics
Sourcepub fn push(&mut self, diagnostic: Diagnostic)
pub fn push(&mut self, diagnostic: Diagnostic)
Push a diagnostic into this collection.
Sourcepub fn errors(&self) -> impl Iterator<Item = &Diagnostic>
pub fn errors(&self) -> impl Iterator<Item = &Diagnostic>
Returns an iterator over the error diagnostics.
Sourcepub fn warnings(&self) -> impl Iterator<Item = &Diagnostic>
pub fn warnings(&self) -> impl Iterator<Item = &Diagnostic>
Returns an iterator over the warning diagnostics.
Trait Implementations§
Source§impl Debug for Diagnostics
impl Debug for Diagnostics
Source§impl Display for Diagnostics
impl Display for Diagnostics
Source§impl Error for Diagnostics
impl Error for Diagnostics
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Diagnostics
impl RefUnwindSafe for Diagnostics
impl Send for Diagnostics
impl Sync for Diagnostics
impl Unpin for Diagnostics
impl UnwindSafe for Diagnostics
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