pub trait Scanner {
// Required methods
fn scan_file(&self, path: &Path) -> Result<Vec<Finding>>;
fn scan_directory(&self, dir: &Path) -> Result<Vec<Finding>>;
// Provided method
fn scan_path(&self, path: &Path) -> Result<Vec<Finding>> { ... }
}Expand description
Core trait for all security scanners.
Scanners implement this trait to provide file and directory scanning capabilities.
The default scan_path implementation handles path validation and delegates to
either scan_file or scan_directory based on the path type.