Trait rslint_cli::Formatter [−][src]
pub trait Formatter {
fn emit_with_writer(
&mut self,
diagnostics: &[Diagnostic],
files: &dyn Files,
writer: &mut dyn WriteColor
) -> Result<(), Error>;
fn emit_stdout(
&mut self,
diagnostics: &[Diagnostic],
files: &dyn Files
) -> Result<(), Error> { ... }
fn emit_stderr(
&mut self,
diagnostics: &[Diagnostic],
files: &dyn Files
) -> Result<(), Error> { ... }
}
Expand description
A trait describing a struct which can render diagnostics to a writer such as stderr.
Each formatter may rely on behavior specific to a batch of diagnostics, therefore you should collect all diagnostics and then call the appropriate formatter