pub enum ScannerBuildError {
Rule(RuleError),
EmptyRuleId,
EmptyMatcher {
rule_id: RuleId,
},
TooManyRules,
AutomatonBuild(BuildError),
}Expand description
Error returned when a Scanner cannot be compiled from its configured
rules.
Scanner construction is a separate phase from scanning. All validation and
matcher compilation happen in ScannerBuilder::build, allowing
Scanner::scan to remain deterministic and free of
rule-construction errors.
Variants§
Rule(RuleError)
EmptyRuleId
A rule uses an empty identifier.
Rule identifiers are part of the stable machine-readable finding contract and therefore cannot be empty.
EmptyMatcher
A literal, prefix, or suffix matcher is empty.
Empty matchers are rejected because they either match every source position or otherwise have no useful detection semantics.
TooManyRules
The configured rule count exceeds the capacity of the internal compact rule index.
The exact internal integer representation is deliberately not part of the public API and may change after layout and benchmark measurements.
AutomatonBuild(BuildError)
The shared multi-pattern automaton could not be built.
Trait Implementations§
Source§impl Debug for ScannerBuildError
impl Debug for ScannerBuildError
Source§impl Display for ScannerBuildError
impl Display for ScannerBuildError
Source§impl Error for ScannerBuildError
impl Error for ScannerBuildError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()