pub trait Reporter {
// Required methods
fn report(&mut self, finding: &VerifiedFinding) -> Result<(), ReportError>;
fn finish(&mut self) -> Result<(), ReportError>;
}Expand description
Trait implemented by all finding reporters.
§Examples
use keyhog_core::{JsonlReporter, Reporter};
let mut out = Vec::new();
let mut reporter = JsonlReporter::new(&mut out);
reporter.finish().unwrap();Required Methods§
Sourcefn report(&mut self, finding: &VerifiedFinding) -> Result<(), ReportError>
fn report(&mut self, finding: &VerifiedFinding) -> Result<(), ReportError>
Emit one finding into the report stream.
Sourcefn finish(&mut self) -> Result<(), ReportError>
fn finish(&mut self) -> Result<(), ReportError>
Flush and finalize the report output.