Skip to main content

load_detectors

Function load_detectors 

Source
pub fn load_detectors(dir: &Path) -> Result<Vec<DetectorSpec>, SpecError>
Expand description

Load all detector specs from a directory of TOML files. Runs quality gate on each detector. Rejects detectors with errors, warns on issues.

§Examples

use keyhog_core::load_detectors;
use std::path::Path;

let detectors = load_detectors(Path::new("detectors"))?;
assert!(!detectors.is_empty());