pub trait DiagnosticReport {
// Required methods
fn message(&self) -> String;
fn level(&self) -> DiagnosticLevel;
}Expand description
Trait for types that can report diagnostic information.
All diagnostic result types implement this trait to provide a consistent interface for accessing the diagnostic message and severity level.
Required Methods§
Sourcefn message(&self) -> String
fn message(&self) -> String
Returns the human-readable message describing this diagnostic.
The message should clearly explain what the issue is and, where possible, suggest how to fix it.
Sourcefn level(&self) -> DiagnosticLevel
fn level(&self) -> DiagnosticLevel
Returns the severity level of this diagnostic.
Used for filtering and prioritizing diagnostic results.