pub trait Diagnosable {
// Required methods
fn add_diagnostic(&mut self, _diagnostic: Diagnostic);
fn add_diagnostics(&mut self, _diagnostics: Vec<Diagnostic>);
fn diagnostics(&self) -> Cow<'_, [Diagnostic]>;
// Provided method
fn first_error(&self) -> Option<Cow<'_, Diagnostic>> { ... }
}