dd_sds/scanner/config.rs
1use crate::scanner::error::CreateScannerError;
2use crate::{CompiledRule, Labels, RegexRuleConfig};
3
4pub trait RuleConfig: Send + Sync {
5 fn convert_to_compiled_rule(
6 &self,
7 rule_index: usize,
8 label: Labels,
9 ) -> Result<Box<dyn CompiledRule>, CreateScannerError>;
10
11 fn as_regex_rule(&self) -> Option<&RegexRuleConfig> {
12 None
13 }
14}