pub struct Diagnostic {
pub labels: Vec<Label>,
pub notes: Vec<Note>,
pub helps: Vec<Help>,
pub suggestions: Vec<Suggestion>,
}Expand description
Rich diagnostic information for errors and warnings.
This struct collects all supplementary information that can be attached to a diagnostic message.
Fields§
§labels: Vec<Label>Secondary labels pointing to related code locations.
notes: Vec<Note>Informational notes providing context.
helps: Vec<Help>Actionable help suggestions.
suggestions: Vec<Suggestion>Code suggestions that can be applied to fix the issue.
Implementations§
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
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 Diagnostic
impl Debug for Diagnostic
Source§impl Default for Diagnostic
impl Default for Diagnostic
Source§fn default() -> Diagnostic
fn default() -> Diagnostic
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
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