Skip to main content

OutputFormat

Trait OutputFormat 

Source
pub trait OutputFormat: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn extension(&self) -> &'static str;
    fn write(
        &self,
        result: &AnalysisResult,
        options: &OutputOptions,
        writer: &mut dyn Write,
    ) -> Result<()>;
}
Expand description

Trait for output formatters.

Required Methods§

Source

fn name(&self) -> &'static str

Get the format name.

Source

fn extension(&self) -> &'static str

Get the file extension.

Source

fn write( &self, result: &AnalysisResult, options: &OutputOptions, writer: &mut dyn Write, ) -> Result<()>

Write the analysis result to the writer.

Implementors§