Skip to main content

DiagnosticReport

Trait DiagnosticReport 

Source
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§

Source

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.

Source

fn level(&self) -> DiagnosticLevel

Returns the severity level of this diagnostic.

Used for filtering and prioritizing diagnostic results.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§