pub trait OutputFormatter: Send + Sync {
// Required methods
fn format_results(
&self,
results: &[AnalysisResult],
config: &Config,
) -> Result<String>;
fn format_repository_info(
&self,
repo_info: &RepositoryInfo,
config: &Config,
) -> Result<String>;
fn format_name(&self) -> &'static str;
fn file_extension(&self) -> &'static str;
// Provided method
fn supports_streaming(&self) -> bool { ... }
}
Expand description
Trait for output formatting implementations
Required Methods§
Sourcefn format_results(
&self,
results: &[AnalysisResult],
config: &Config,
) -> Result<String>
fn format_results( &self, results: &[AnalysisResult], config: &Config, ) -> Result<String>
Format analysis results
Sourcefn format_repository_info(
&self,
repo_info: &RepositoryInfo,
config: &Config,
) -> Result<String>
fn format_repository_info( &self, repo_info: &RepositoryInfo, config: &Config, ) -> Result<String>
Format repository information
Sourcefn format_name(&self) -> &'static str
fn format_name(&self) -> &'static str
Get supported output format name
Sourcefn file_extension(&self) -> &'static str
fn file_extension(&self) -> &'static str
Get file extension for output format
Provided Methods§
Sourcefn supports_streaming(&self) -> bool
fn supports_streaming(&self) -> bool
Check if format supports streaming output