pub trait Diagnostic: Debug + Send {
// Required methods
fn severity(&self) -> Severity;
fn as_report<'a>(&'a self, source: &'a str, path: &'a str) -> Vec<Group<'a>>;
fn primary_span(&self) -> Span;
fn title(&self) -> Cow<'static, str>;
// Provided method
fn title_snippet(&self) -> Title<'static> { ... }
}Required Methods§
fn severity(&self) -> Severity
fn as_report<'a>(&'a self, source: &'a str, path: &'a str) -> Vec<Group<'a>>
fn primary_span(&self) -> Span
fn title(&self) -> Cow<'static, str>
Provided Methods§
fn title_snippet(&self) -> Title<'static>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".