pub trait Formatter {
// Required method
fn format<W: Write>(
&self,
result: &LintResult,
filename: &str,
writer: &mut W,
) -> Result<()>;
// Provided method
fn format_to_string(&self, result: &LintResult, filename: &str) -> String { ... }
}Expand description
Trait for formatting lint results.
Required Methods§
Provided Methods§
Sourcefn format_to_string(&self, result: &LintResult, filename: &str) -> String
fn format_to_string(&self, result: &LintResult, filename: &str) -> String
Format the lint result to a string.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.