Skip to main content

Reporter

Trait Reporter 

Source
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§

Source

fn report(&mut self, finding: &VerifiedFinding) -> Result<(), ReportError>

Emit one finding into the report stream.

Source

fn finish(&mut self) -> Result<(), ReportError>

Flush and finalize the report output.

Implementors§